Skip to content
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

Performance of Logging Extension #84

Open
Brunni opened this issue Sep 9, 2024 · 1 comment
Open

Performance of Logging Extension #84

Brunni opened this issue Sep 9, 2024 · 1 comment

Comments

@Brunni
Copy link

Brunni commented Sep 9, 2024

As there might be really, really many log messages, it might be important to tune the extension regarding performance.

e.g. Remove the new list here:

var additionalFields = new List<KeyValuePair<string, object?>>();

Why use ToArray here and not ToList?

AdditionalFields = GetAdditionalFields(logLevel, eventId, state, exception).ToArray()

@mattwcole
Copy link
Owner

Hi, I'm very much open to introducing performance improvements where they make sense. Any improvements would need to be quantified with benchmarks however. If that is something you are interested in working on, then please feel free to submit some PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants