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

Compatibility cache lookup allocates Func for each lookup #10919

Closed
jebriede opened this issue Jun 4, 2021 · 0 comments · Fixed by NuGet/NuGet.Client#4095
Closed

Compatibility cache lookup allocates Func for each lookup #10919

jebriede opened this issue Jun 4, 2021 · 0 comments · Fixed by NuGet/NuGet.Client#4095
Assignees
Labels
Category:Quality Week Issues that should be considered for quality week Functionality:Restore PerfWins Tenet:Performance Performance issues Type:Bug

Comments

@jebriede
Copy link
Contributor

jebriede commented Jun 4, 2021

The CompatibilityProvider uses a cache in the check if frameworks are compatible. The code that checks the cache or adds an entry causes an allocation of a func on each lookup, causing an overallocation of objects.

Name                                                                      	Inc %	          Inc
 Type System.Func`2[NuGet.Frameworks.CompatibilityCacheKey,System.Boolean]	  0.6	   42,664,364
+ clr!?                                                                   	  0.6	   42,664,364
 + nuget.frameworks!CompatibilityProvider.IsCompatible                    	  0.6	   42,664,364
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category:Quality Week Issues that should be considered for quality week Functionality:Restore PerfWins Tenet:Performance Performance issues Type:Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants