Uh oh!
There was an error while loading. Please reload this page.
Optimizing Eventsource memory allocations and removing an extra comment. - #684
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
# Conflicts: # src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlAuthenticationProviderManager.NetCoreApp.cs # src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlAuthenticationProviderManager.cs
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…ra comment. (dotnet#684)" This reverts commit 0927024.
This PR is addressing Issue#92 and Issue#681.
Issue#92 regarding
// call OnError outside of _ErrorCollectionLock to avoid deadlockcomment, apparently the lock is moved inside a function calledGetFullErrorAndWarningCollectionto avoid deadlocks. comment is safely removed.Issue#681: This is a first step of making EventSource optimized. all
ToString()methods are removed from eventsource related code implementation, if possible, and moved inside EventSource class inside theif checkersto see if the log is requested, for perf improvement. all arguments passed toNonEventfunctions are checked fornullvalues and null-coalescing operator is applied inside EventSource class.New methods have been added to EventSource class overloads. This methods do not have the
IsEnabledchecker inside them. They are used whenIsEnabledis called out of EventSource class, for instance when a setup was needed to make one or more variables to be passed to EventSource functions. These methods have the bare name such as TraceEvent etc.Older methods in
NonEventoverloads region of EventSource class, the one withIsEnabledchecker inside, a prefix ofTryis added to the old names to distinguish between two different kind of overloads.There were places that log levels, such as "INFO' or "API" and etc. as a separate string to the string.Format method, I have combined those two strings to be one and use a different overload from EventSource.
At some places while using null coalescing the log message was passing a string containing "null" or "", in possible cases I have removed them as the null checker is applied inside
EventSourceclass.