-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
GetAllGlobs optimizations #2652
GetAllGlobs optimizations #2652
Conversation
Eliminates enumerator allocations, and ImmutableList nodes.
Eliminates enumerator allocations, and ImmutableList nodes.
This has some positive memory effect to normal evaluations as well. Evaluation: Time (ms)
Evaluation: Memory (bytes)
Build: Time (ms)
Build: Memory (bytes)
|
return _fileMatcher; | ||
} | ||
|
||
_fileMatcher = CreateFileSpecMatcher(); |
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.
This could be created multiple times is that a problem?
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.
Thought about that as well, but after looking at how it's called, it should be single threaded. Evaluation and Project apis are single threaded. Then even if they were multi threaded, the Itemspecs themselves would be thread local. If however, in the future, the itemspecs end up getting shared between threads then yes, this will be a problem.
Do you think it's worth prematurely making it thread safe again?
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.
No, just wanted to make sure it was deliberate.
GetAllGlobs has become part of the VS solution load critical path. This PR does a couple of optimizations:
Numbers from GetAllGlobs when simulating the Roslyn.sln solution load:
Not including the lazy glob change:
Including the lazy glob change:
Closes #2647