You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 13, 2018. It is now read-only.
Normally one can have very fast logging when registering a single LoggerProvider with IncludeScopes = false, where BeginScope returns a NullScope.
Now because of #723 then extra allocation occurs because the following optimization was removed:
if (loggers.Length == 1)
return loggers[0].Logger.BeginScope(state);
If the LoggerProvider attempts to implement ISupportExternalScope (And has IncludeScopes = false), then the LoggerFactory will generate even more garbage-allocation because it forces creation of AsyncLocal-state that must be transferred when using async-threading-tasks.
Again if the above optimization was used, then one could skip the external-scope-provider-logic when only a single LoggerProvider (IncludeScopes = false would continue to work).