Skip to content

Optimize log injection with NLog#1475

Merged
kevingosse merged 2 commits into
masterfrom
kevin/nlog_optim
May 25, 2021
Merged

Optimize log injection with NLog#1475
kevingosse merged 2 commits into
masterfrom
kevin/nlog_optim

Conversation

@kevingosse

Copy link
Copy Markdown
Contributor

Instead of registering the values of the properties for each span created, register properties for each trace and have those fetch the active span.

Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
Old 13.736 us 0.0642 us 0.0536 us 0.1831 - - 16.74 KB
New 5.899 us 0.0828 us 0.0774 us 0.0687 - - 6.34 KB

Since Serilog and NLog now use a very similar logic, I think there's some refactoring to do. But I'm going to optimize log4net first so I can refactor them all at once.

@kevingosse kevingosse added the type:performance Performance, speed, latency, resource usage (CPU, memory) label May 19, 2021
@kevingosse
kevingosse requested a review from a team as a code owner May 19, 2021 10:38
@kevingosse
kevingosse merged commit 73cb974 into master May 25, 2021
@kevingosse
kevingosse deleted the kevin/nlog_optim branch May 25, 2021 10:13
@andrewlock andrewlock added this to the 1.27.0 milestone Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:performance Performance, speed, latency, resource usage (CPU, memory)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants