Hacker News new | past | comments | ask | show | jobs | submit login
How to optimize memory usage and eliminate GC pauses in .NET app (medium.com/swlh)
6 points by mcsoft on Jan 19, 2022 | hide | past | favorite | 4 comments



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.


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.


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


thanks!




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: