-
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
ArrayPool logging initialization is 70% of startup for empty program #9579
Comments
cc @vancem |
Just curious, what in an empty program uses ArrayPool? |
The first call comes from Path APIs:
|
Time wise 87% is EventSource.GetGuid |
@benaadams : Then using the internal EventSource ctor with the guid would be way to go. Reading the Guid via reflection is costly after all. FrameworkEventSource() uses this trick. |
Seems to do the trick, goes straight to |
That was a fast change. The numbers look great. |
Empty program executes about 320 managed methods today (in release build). Initialization of ArrayPool logging (ArrayPoolEventSource) is responsible for 220 of them. When the ArrayPool initialization is commented out, I am back to about 100 where we used to to be historically.
Is the ArrayPool logging valueable enough to contribute this much to startup cost of empty program? Can we make it cheaper or not have it?
The text was updated successfully, but these errors were encountered: