-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building an ASP.NET project 2-10x slower with .NET 9 vs .NET 8 #43470
Comments
I don't repro the slowdowns - can you do this again and get binlogs for each run? The in every case, the step that took the longest was the It's my strong suspicion that |
@baronfel will do now and post my findings. FWIW that target is not what takes appreciable time for me. Here it's |
in that case cc @javiercn for static web assets delays |
@baronfel also - not disagreeing per se, but if this were a |
I can only report my findings, I don't know what to tell you otherwise. I am on Windows though which may have different performance characteristics from your macOS host! In any case, binlogs from your repo will be the most accurate thing for us to work from. |
@baronfel MSBuild binary log files generated and included w/ the repo - e.g.: https://github.com/nwoolls/spl-dotnet-9-slow-build/blob/main/advanced/mvc-dotnet-9/msbuild.binlog |
It does 😆. I apologize for not reporting sooner — this is what kept me away from earlier preview releases. And why I came back for the RC to see if it was fixed. |
Describe the bug
Building ASP.NET MVC applications with .NET 9 is 2x slower than .NET 8 for basic applications and 10x slower for applications that utilize several client-side libraries (e.g. with LibMan).
To Reproduce
See the following GitHub repository to reproduce: https://github.com/nwoolls/spl-dotnet-9-slow-build
The applications in this project were created with
dotnet new mvc
. The projects in thesimple
folder stop at that. The projects in theadvanced
folder have a handful of client-side libraries that are installed using the LibMan CLI.Running
benchmark.js
from the repository yields:Benchmark results:
Simple MVC .NET 8 (avg. seconds): 1.05
Simple MVC .NET 9 (avg. seconds): 2.08
Advanced MVC .NET 8 (avg. seconds): 3.48
Advanced MVC .NET 9 (avg. seconds): 30.96
Exceptions (if any)
Running
dotnet clean
beforedotnet build
results in dramatically faster build times, even though the client-side libraries are restored by LibMan prior to theBeforeBuild
MSBuild target.Benchmark results:
Simple MVC .NET 8 (avg. seconds): 1.15
Simple MVC .NET 9 (avg. seconds): 2.06
Advanced MVC .NET 8 (avg. seconds): 2.21
Advanced MVC .NET 9 (avg. seconds): 2.42
Further technical details
dotnet —info
None
The text was updated successfully, but these errors were encountered: