In many of the services I work on there are a lot of logging being done. The services are WCF services(mostly) which use the .NET EventLogger class.
I'm in the process of improving these services' performance, and I got to think that logging asynchronously would benefit performance.
I'm unaware to what happens when multiple threads ask to log, and it if creates a bottleneck, but even if it doesn't I still think that it shouldn't interfere with the actual process being executed.
My thoughts are that I should invoke the same log method I call now but do so using a new thread, while continuing with the actual process.
Some questions about that:
Is it ok?
Are there any downsides?
Should it be done in a different way?
Maybe its so fast that it doesn't even worth the effort?