Look Mommy, No GC
summary
Shows that excessive allocation causes large GC pauses (one Unity case reports ~33% of frame time in GC and traces peak GC time to 50–85%), and that using the right patterns and tools fixes it: use PerfMon / typeperf plus ETW + PerfView and allocation profilers (CLR Allocation Analyzer, dotMemory), measure with BenchmarkDotNet, and change code: implement IEquatable to cut allocations and get ~3x faster comparisons, replace LINQ with loops (observed ~10x speedup), use value types, pooling and ArrayPool, and stop calling GC.
AI-written summary · about
chapters (13)
- 0:00Introduction and motivation
- 1:25Garbage collection side effects
- 4:59Identifying memory problems
- 8:09Performance counters overview
- 11:00Event tracing for Windows
- 15:18Analyzing ETW recordings
- 22:20Static code analysis benefits
- 24:55Dynamic memory profilers
- 27:02Understanding boxing impact
- 35:16Lambdas and memory allocation
- 40:47LINQ performance pitfalls
- 42:35General optimization tips
- 49:34Q&A session
