platform-compat icon indicating copy to clipboard operation
platform-compat copied to clipboard

High build time performance impact

Open nphmuller opened this issue 5 years ago • 3 comments

I really like this package, but the build time impact at the moment is simply to high for me to use it.

On version 0.2.12-alpha: Without: ~10 sec With: ~30 sec

There doesn't seem to be an analyzer that I can single out that's responsible for the time impact. I've tried disabling all analyzers except DE0001, and all analyzers except PC001, but the build time still seems to be about 30 sec.

nphmuller avatar Jun 25 '19 13:06 nphmuller

I can't reproduce this build time impact on a fresh empty ASP.NET Core 3.0 project.

Can you give some more specifics how your solution is set up?

chucker avatar Jun 25 '19 18:06 chucker

@chucker I can't share our application code, but I've created a repro with a db model size and db migration count of about the same as in our application.

git clone https://github.com/nphmuller/AnalyzerPerformanceIssue.git
cd AnalyzerPerformanceIssue

# Takes about 4 sec on my machine
dotnet restore && dotnet clean && dotnet build --no-restore

# Now it takes about 9 sec on my machine.
dotnet add package Microsoft.DotNet.Analyzers.Compatibility --version 0.2.12-alpha
dotnet restore && dotnet clean && dotnet build --no-restore

nphmuller avatar Jun 26 '19 09:06 nphmuller

This analyzer is adding 6.4 seconds (an additional 116%) to the build time in our most common scenario. I need to prioritize our developers' trains of thought when making a change and rerunning tests, and this extra time makes a material difference.

jnm2 avatar Aug 11 '19 00:08 jnm2