Skip to content

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

Closed
NuGet/NuGet.Client
#4954

Description

@marcin-krystianc

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

Metadata

Metadata

Assignees

Labels

Area:RestoreCPMCentral package managementCommunityPRs (and linked Issues) created by someone not in the NuGet teamPriority:2Issues for the current backlog.Type:Bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions