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

Performance regression of NuGet restores in the sdk v7.0.100 due to calculation of "CentralTransitiveDependencyGroups" #12269

Closed
marcin-krystianc opened this issue Nov 23, 2022 · 0 comments · Fixed by NuGet/NuGet.Client#4954
Assignees
Labels
Area:RestoreCPM Central package management Community PRs (and linked Issues) created by someone not in the NuGet team Priority:2 Issues for the current backlog. Type:Bug
Milestone

Comments

@marcin-krystianc
Copy link

marcin-krystianc commented Nov 23, 2022

NuGet Product Used

dotnet.exe

Product Version

7.0.100

Worked before?

6.0.400

Impact

I'm unable to use this version

Repro Steps & Context

NuGet restore got considerably slower due to changes in how the CentralTransitiveDependencyGroups is calculated (NuGet/NuGet.Client#4669.
For some of our internal solutions (which, unfortunately, we cannot share publicly ) the restore time was increased to tens of minutes. It makes it impossible for us to migrate to dotnet 7. We can't share our internal solution but, we have a public repro that demonstrates the problem on a smaller scale where the restore time is doubled.

1: checkout https://github.com/marcin-krystianc/TestSolutions/tree/master/LargeAppWithPrivatePackagesCentralisedNGBVRemoved
2. create global.json for older versions e.g. 6.0.400
3. Go to LargeAppWithPrivatePackagesCentralisedNGBVRemoved\solution directory and run dotnet restore --force -clp:summary /p:RestoreUseStaticGraphEvaluation=true to measure performance before the problem existed
4. set version 7.0.100 in global.json
5. run dotnet restore --force -clp:summary /p:RestoreUseStaticGraphEvaluation=true again to see performance regression (45s vs 90s on my machine)

PS:
I'm going to submit a PR with a fix for this problem.

Verbose Logs

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area:RestoreCPM Central package management Community PRs (and linked Issues) created by someone not in the NuGet team Priority:2 Issues for the current backlog. Type:Bug
Projects
None yet
4 participants