-
Notifications
You must be signed in to change notification settings - Fork 403
Description
This is an overarching issue that I'm using to track evaluation/build performance issues across all repos. This has a .NET Core/.NET Standard focus, but due to overlap, improvements such as dotnet/msbuild#1276, will improve all project types.
Notes:
- Due to the behavior of projects inheriting their project references' evaluation cost during a build, evaluation is overwhelmingly the largest cost. It is also affects all scenarios inside and outside of VS. All focus should be on reducing this cost first, followed by design-time build task/target time, then full build (both VS and CLI) task/target time.
- In huge solutions, I'm seeing GC CPU time from 15% - 25%. For these, we should focus on evaluation allocations and get this to under 10%.
- In small solutions, I'm seeing evaluation time, in particular disk walks, disk lookups and expressions be problematic. Focus should be reducing number of globs, and removing unnecessary expressions especially ones that use property functions.
Evaluation
Long evaluation times increases almost all scenarios including project load, adding/removing files, build, time-to-intellisense. Because both project systems will block the UI thread waiting for this - single project evaluation should be 20-50 ms.
CPU Time
Breakdown: Overhead of evaluation is too high for design-time build
Memory
Build
Long build times increases F5, project load (legacy), editing (legacy) and time-to-intellisense. Because the legacy project system blocks the UI thread waiting for this - a single project design-time build should be 100-200ms.
CPU Time
Breakdown (design-time build): Overhead of SDK build targets is too high for design-time builds
Breakdown (normal build): Overhead of SDK build targets is too high for a normal build
Term | Meaning |
---|---|
CLI build | Command-line build of a project or a solution |
Design-time build | Design-time build of a single project |
VS build | Visual Studio build of a project or a solution |
Memory
% | Bug | Owner | CLI build | Design-time build | VS build | Notes |
---|---|---|---|---|---|---|
MSBuild | ● | ● | ● | |||
MSBuild | ● | ● | ● | |||
CLI | ● | ● | ● | |||
MSBuild | ● | ● | ● | |||
CLI | ● | ● | ● | |||
CLI | ● | ● | ● | |||
NuGet | ● | ● | ● |
Customer action items:
- Remove
<PackageReference/>
to NETStandard.Library.NETFramework - this has been replaced with functionality as part of .NET Core 2.0 SDK. - Upgrade to 2.1 of .NETStandard.Library.