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
ITraceWriter is designed to not incur a performance cost for categories and levels where tracing is disabled. Specifically, traceAction should only be called if tracing is enabled. Accordingly, NlogTraceWriter.Trace should first check whether NLog is tracing at a given level, and only call traceAction if it is. This would provide a major performance improvement.
The text was updated successfully, but these errors were encountered:
I wouldn't mind, but I'd rather not allocate the time to jump into this this project. It seems an easy fix. If not, I can help out.
On a separate perf topic, you could replace the lazy dictionary with a simple array and get a nice boost as well. In general, tracing libraries tend to be performance sensitive, so they are worthy of more optimization effort than other code.
ITraceWriter
is designed to not incur a performance cost for categories and levels where tracing is disabled. Specifically,traceAction
should only be called if tracing is enabled. Accordingly,NlogTraceWriter.Trace
should first check whether NLog is tracing at a given level, and only calltraceAction
if it is. This would provide a major performance improvement.The text was updated successfully, but these errors were encountered: