-
Notifications
You must be signed in to change notification settings - Fork 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
Reduce allocations in AbstractSymbolCompletionProvider.CreateItems #74670
Reduce allocations in AbstractSymbolCompletionProvider.CreateItems #74670
Conversation
The linq expression shows up as about 0.3% of allocations in the profile I'm looking for in the typing section of the scrolling speedometer test. MultiDictionary has a struct-based value that is great for the case where the valueset typically is only a single object (which is the case for this code).
test failing because of SymbolAndSelectionInfo's Equals comparison not matching what was previously used in this context. Need to ponder. |
OK, hopefully fixed by adding a separate comparer. |
@genlu -- ptal |
/// <summary> | ||
/// Alternative comparer to SymbolAndSelectionInfo's default which considers both the full symbol and preselect. | ||
/// </summary> | ||
protected sealed class SymbolReferenceEquivalenceComparer : IEqualityComparer<SymbolAndSelectionInfo> |
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.
Why protected? #Resolved
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.
Copy/paste oopsie
The linq expression shows up as about 0.3% of allocations in the profile I'm looking for in the typing section of the scrolling speedometer test.
MultiDictionary has a struct-based value that is great for the case where the valueset typically is only a single object (which is the case for this code).
*** Relevant allocations from the profile I'm looking at ***