I suspect a library I'm using is violently calling GC.Collect(), which is causing issues. How can I confirm if such a manually triggered collection is indeed happening?
My program has high memory throughput itself, but many 100 Gen 2 collections per second still seem very unlikely to me, especially considering it's using only a few 100 MB of RAM.
There is a performance counter for that, "Induced GC" ticks up every time GC.Collect() is called. Use Perfmon.exe to look at it, right-click the graph > Add Counters > .NET CLR Memory > # Induced GC > select your exe.
A decent decompiler is always useful as well (ILSpy, Reflector, etc), you can tell the author exactly what method he needs to fix.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With