-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Assembly loader event tracing is very expensive (10x application slowdown) #78539
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov Issue DetailsRepro
Actual resultProgram runs more than 10x slower when the perfview collection session is active Expected resultDefault perfview collection settings should not slow down the program by more than 10% The problem is caused by very slow assembly loader tracing. The fix should be to either make assembly loader tracing a lot faster and lighter weight for cases like this one and/or assembly loader tracing should not be enabled for default (perfview) event collection settings.
|
I don't think detailed assembly load tracing should be enabled by default - it was not designed for that case. We specifically "Didn't care much" about perf since the goal was to provide on demand diagnostic tool. @elinor-fung could you please look into disabling this as part of the default collection? |
Agreed - it is intended for targeted assembly loading investigation and should not be enabled by default. I'll look at updating perfview / TraceEvent defaults. |
It looks like some of the VS tools also enable it - I'll get in contact for those as well. |
Repro
dotnet new console
in .NET 7 SDK, copy&paste the following program (repro extracted from actual app where the issue was observed)dotnet run
Actual result
Program runs more than 10x slower when the perfview collection session is active
Expected result
Default perfview collection settings should not slow down the program by more than 10%
The problem is caused by very slow assembly loader tracing. The fix should be to either make assembly loader tracing a lot faster and lighter weight for cases like this one and/or assembly loader tracing should not be enabled for default (perfview) event collection settings.
The text was updated successfully, but these errors were encountered: