NLog.Targets.HTTP icon indicating copy to clipboard operation
NLog.Targets.HTTP copied to clipboard

Consumes processor resources even when idle.

Open benjewhitesky opened this issue 2 years ago • 0 comments

Thank you for providing this extension to NLOG, the features and performance of which has been very useful to us.

We noticed one relatively minor performance problem with it. When idle, the background task has an infinite loop that polls a queue. On Windows, with a relatively high-spec i7 laptop this is no problem. No more than 0.5% of the CPU is ever consumed. On a Linux virtual machine, with many Docker containers, each container reports at least 30% CPU usage. We can of course discuss resource provisioning in Docker, and I am no expert in it, but I was able to fix the usage problem directly in your code.

I will attach a pull request to this issue in case you should find it useful.

Thank you for taking a look.

benjewhitesky avatar May 19 '22 08:05 benjewhitesky