New dependency graph resolver has significant performance loss with RuntimeIdentifier #14180
Labels
Area:NewDependencyResolver
Issues related to the new dependency graph resolver
Resolution:Duplicate
This issue appears to be a Duplicate of another issue
Type:Bug
NuGet Product Used
dotnet.exe
Product Version
9.0.201
Worked before?
8
Impact
It's more difficult to complete my work
Repro Steps & Context
We have observed a very significant performance degradation for NuGet restore in .NET SDK 9 with the new dependency graph resolver. This is fixed for us by using
<RestoreUseLegacyDependencyResolver>true</RestoreUseLegacyDependencyResolver>
.Microsoft.Build.Traversal
to create a singledirs.proj
file we can target to run the build.<RestoreUseStaticGraphEvaluation>true</RestoreUseStaticGraphEvaluation>
; the speed is even worse without this enabled.ManagePackageVersionsCentrally
, andCentralPackageTransitivePinningEnabled
RuntimeIdentifier
set.ProjectReference
dependency on the executable projects. This allows the executables and all dependencies to be collected into a single directory using a publish operation. This metaproject also has aRuntimeIdentifier
set.We recently noticed a notable increase in package restore time and began researching. The problem is particularly noticeable on slower GitHub Actions Windows build agents, but it is clearly apparent on developer machines as well. The metrics below are from a clean restore (cache filled but
obj
directories cleaned) on a developer machine.There is also some evidence in the logs that the projects that include a
RuntimeIdentifer
are the culprits. You can observe in the log snippet below from GitHub Actions that certain projects are much slower. These are the executable projects, except forDependencyHarvester
, which is the metaproject.Verbose Logs
The text was updated successfully, but these errors were encountered: