mattwcole / gelf-extensions-logging

GELF provider for Microsoft.Extensions.Logging
MIT License
109 stars 42 forks source link

Performance of Logging Extension #84

Open Brunni opened 2 months ago

Brunni commented 2 months ago

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: https://github.com/mattwcole/gelf-extensions-logging/blob/22ee531949f54d5da26b958e6bcdfc622c027d18/src/Gelf.Extensions.Logging/GelfLogger.cs#L113

Why use ToArray here and not ToList? https://github.com/mattwcole/gelf-extensions-logging/blob/22ee531949f54d5da26b958e6bcdfc622c027d18/src/Gelf.Extensions.Logging/GelfLogger.cs#L42

mattwcole commented 2 months ago

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.