Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Garbage collection every time logs are appended #20
Comments
|
@AdamWilks , thanks for reporting this. What you describe is really not the intended behavior, we'll look at this. |
|
@AdamWilks , new version (beta) has been just released. You can get it on https://github.com/loggly/log4net-loggly/releases/tag/v9.0.0-beta1 or via Nuget. It's almost complete rewrite and there is no The |
|
Thanks for the quick response @Katulus, that's awesome. We will look at upgrading as soon as we get the chance. |
While investigating some performance issues with a website in am currently working on I discovered that the implementations of LogglyClient and LogglySendBufferedLogs both call GC.Collect() after appending new data.
This is especially bad for applications which produce quite verbose log output as it can trigger constant garbage collections to happen in all 3 generations. In addition under circumstances where the application error rate increases for any reason there is potential for additional garbage collections to worsen the situation.
Best practice guidelines from Microsoft are to only call GC.Collect() for "unique situations and testing" so can these calls be removed, or at least be made configurable?
On a side note, the same files also make calls to Console.WriteLine() if an error occurs when sending. Would it make sense for these to be replaced by something like Debugger.Log()?
The text was updated successfully, but these errors were encountered: