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

Avoid unnecessarily resizing dictionary while calculating project closure #10976

Closed
kartheekp-ms opened this issue Jun 30, 2021 · 2 comments · Fixed by NuGet/NuGet.Client#4133
Assignees
Labels

Comments

@kartheekp-ms
Copy link
Contributor

kartheekp-ms commented Jun 30, 2021

Thanks to @davkean for identifying a performance improvement in NuGet.

ToDictionary does not let you specify an underlying starting capacity. This causes it to inherit the default size and unnecessarily resize itself multiple times in a large solution. Added a version of ToDictionary that lets you specify a default.

https://github.com/davkean/NuGet.Client/blob/e97d556a83750bb4f8017e3640bc699d04832657/src/NuGet.Core/NuGet.ProjectModel/DependencyGraphSpec.cs#L191-L192

This was allocating 0.5% (150 MB) opening a 1000 project solution.

NuGet/NuGet.Client#4129 (comment)

@aortiz-msft
Copy link
Contributor

@kartheekp-ms - Could you please help understand what is the improvement for OrchardCore?

@aortiz-msft
Copy link
Contributor

@jebriede so that this can be tracked with the others

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants