Restore: skip .NET SDK-style projects during no-op evaluation #9189
Labels
Area:RestoreNoOp
The PackageReference no-op
Functionality:Restore
Priority:2
Issues for the current backlog.
Style:PackageReference
Tenet:Performance
Performance issues
In Visual Studio, because .NET SDK-style projects restores are triggered by project nominations from the project system, there should be no need to perform another restore (even a no-op restore) in most build-triggered restores. By skipping these projects during no-op restore evaluation, no-op restore becomes faster relative to how many .NET SDK-style projects are skipped; so, a solution with no .NET SDK-style projects will realize no benefit while a solution with only .NET SDK-style projects will realize maximum benefit.
As an example, I tested a prototype on the NuGet.Client solution, which at the time had 83 projects (74 .NET SDK-style projects and 9 legacy PackageReference projects). With the solution loaded in Visual Studio and the solution fully restored and built once already, building the up-to-date solution involved a ~2.6 no-op restore. By skipping .NET SDK-style projects during no-op restore evaluation, the no-op restore dropped to ~0.6 seconds. GC heap allocations dropped from ~380 MB to ~88 MB. Total GC pauses dropped by ~1 second.
For this optimization we need to ensure:
CC @aortiz-msft, @anangaur
The text was updated successfully, but these errors were encountered: