Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #45: Improve execution time in large assemblies #69

Merged
merged 7 commits into from
Jan 26, 2024

Conversation

mchaloupka
Copy link
Collaborator

The usage of seq caused the reflection to be done repetitively for all operations. I have improved the execution time of the tests in the provided project (see issue) from 12 seconds to 1.4 seconds just by making this tiny change of materializing the sequences into lists. I had to materialize it in two places:

  • The moment where we filter out all methods that are attributed by one of the event attributes.
  • The place where we select events in-scope for a given scenario

@mchaloupka mchaloupka added this to the v2.0.3 Release milestone Jan 24, 2024
TickSpec/ScenarioGen.fs Outdated Show resolved Hide resolved
TickSpec/TickSpec.fs Outdated Show resolved Hide resolved
@bartelink
Copy link
Member

Wow, nice work to figure out such a productive change

@mchaloupka
Copy link
Collaborator Author

mchaloupka commented Jan 25, 2024

I have done further improvements to scan through the methods less times (it gets the time for the example project under 900ms).

TickSpec/TickSpec.fs Outdated Show resolved Hide resolved
TickSpec/TickSpec.fs Outdated Show resolved Hide resolved
TickSpec/TickSpec.fs Outdated Show resolved Hide resolved
@mchaloupka mchaloupka merged commit d020923 into master Jan 26, 2024
3 checks passed
@mchaloupka mchaloupka deleted the fix/45-execution-time-improvements branch January 26, 2024 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants