-
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 boxing allocations of ExtensionMethodInfo
in IDE side
#69165
Comments
dotnet-issue-labeler
bot
added
Area-Compilers
untriaged
Issues and PRs which have not yet been triaged by a lead
labels
Jul 22, 2023
I think the fix here is to provide a proper value comparer for the multidictionary. |
arkalyanms
removed
the
untriaged
Issues and PRs which have not yet been triaged by a lead
label
Aug 2, 2023
@Youssef1313 -- I'd like to verify the fix I've got locally. Can you share the repro for which you obtained this profile? |
ToddGrun
added a commit
to ToddGrun/roslyn
that referenced
this issue
Aug 9, 2023
Change several structs to record structs such that they no longer are boxed when used as keys in MultiDictionary's internal ImmutableHashSet. When MultiDictionary's value is a struct and is created without specifying the value's IEqualityComparer, the default struct comparer is used. This equality comparer is notoriously slow due to boxing. By switching these structs to record structs, an implementation of IEquatable is generated and the default struct equality comparer isn't used. Addresses dotnet#69165 Sam mentioned that there is an issue already logged in the roslyn-analyzers repo around adding an analyzer to detect this. dotnet/roslyn-analyzers#1640
ToddGrun
added a commit
that referenced
this issue
Aug 10, 2023
Change several structs to record structs such that they no longer are boxed when used as keys in MultiDictionary's internal ImmutableHashSet. When MultiDictionary's value is a struct and is created without specifying the value's IEqualityComparer, the default struct comparer is used. This equality comparer is notoriously slow due to boxing. By switching these structs to record structs, an implementation of IEquatable is generated and the default struct equality comparer isn't used. Addresses #69165 Sam mentioned that there is an issue already logged in the roslyn-analyzers repo around adding an analyzer to detect this. dotnet/roslyn-analyzers#1640
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Found 0.9% boxing allocations of
ExtensionMethodInfo
. Is there a way to reduce that?The text was updated successfully, but these errors were encountered: