-
Notifications
You must be signed in to change notification settings - Fork 648
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
AssemblyScanner improvements #6814
Conversation
13f53e4
to
8535516
Compare
…it is slightly faster
…in one go and the enumerator is not used
25fdf45
to
8b3ce45
Compare
cab0c74
to
92da68a
Compare
src/NServiceBus.Core/Hosting/Helpers/AssemblyScanningComponent.cs
Outdated
Show resolved
Hide resolved
Once the PR is reviewed, I would want to patch 92da68a on current supported versions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some minor suggestions
src/NServiceBus.Core/Hosting/Helpers/AssemblyScanningComponent.cs
Outdated
Show resolved
Hide resolved
@timbussmann I think I addressed all the comments |
1074c5e
to
b086c29
Compare
b086c29
to
32580aa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a comment about a comment (hah!) and pushed up a few minor tweaks.
This is a massive improvement!
Improves the assembly scanner performance in "regular cases" slightly and in cases when the exclusion list is larger, up to 4 times.
I was doing some investigations for a customer that mentioned they are seeing slow startup times in their rather large solution. Once I was able to get my hands on the profiler data it was apparent that the
IsExcluded
check is the culprit.Scenarios
I have created a solution generator that allows simulating arbitrary solution sizes. As a reference point, I created a solution with roughly 960 projects and more than 140K types.
Without Exclusions
Before
After
With a larger number of exclusions
Before
Here is the excerpt from the customer callstack
After
Benchmarks
Attribute.GetCustomAttribute
Matching Strings
PublicKeyValidation