Get Better App Performance with this One Weird Trick
summary
Claims that measuring fixes performance: uses Visual Studio profiler plus BenchmarkDotNet, DiagnosticsHub nuget and a real-world CSVHelper clone. Benchmark starts ~131–155 ms; adding an async read‑ahead buffer drops it to ~130 ms (~16% vs worst case), copilot-suggested larger StreamReader buffer cuts another ~6% (142→133 ms). The CPU usage tool exposes hot paths and async continuation noise; the net object allocation tool finds 92k zero-length type[] allocations (~2.2 MB) and reduces live objects from ~164k to ~156k by changing resolver calls, and the changes validate as faster.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 2:08One weird trick to measure performance
- 3:55Setting up benchmarks
- 8:52Creating benchmark project
- 13:44Where to start improving
- 14:46CPU usage tool for bottlenecks
- 26:49Optimizing CSV parsing with async
- 31:26Improving async with read-ahead buffers
- 41:17Reducing garbage with .NET allocation tool
- 51:05GitHub Copilot for performance insights
- 55:25Key takeaways
- 57:10Q&A
related talks
42mMeasure Twice, Optimize Once: Real-World .NET Profiling with Visual Studio
46mHigh Performance .NET
01h 03mApplication Performance Optimisation in Practice
44m.NET Performance Investigation
01h 03mTurbocharged: Writing High-Performance C# and .NET Code
47mUnlocking Performance Improvements in .NET
57mPragmatic Performance: When to care about perf, and what to do about it
37mRock Your Code Code and App Performance for Microsoft .Net
