top | item 29995856

How to optimize memory usage and eliminate GC pauses in .NET app

6 points| mcsoft | 4 years ago |medium.com

4 comments

order

musicale|4 years ago

It should give you pause if you find that you are spending much of your time fighting the GC.

Perhaps you're doing something very wrong in terms of object allocation and lifetime. Perhaps this GC/memory performance debugging time is well spent and expected - just as you might optimize memory usage (and VM and cache usage) to squeeze out better performance from a C++ program. Or perhaps .NET is not well suited to your requirements.

mcsoft|4 years ago

Luckily it was one time effort which allocated less than 1% of our annual development resources that year. After we've walked away from large arrays allocated in LOH - there were no issues despite further traffic growth.

mcraiha|4 years ago

Tip for the writer, you can use MarkdownExporter or HtmlExporter with BenchmarkDotNet. That way you don't have to take screenshots from the results.