~/talk

Measure Twice, Optimize Once: Real-World .NET Profiling with Visual Studio

slides:none on file

Demonstrates optimizing CSVHelper by running allocation and CPU traces with Visual Studio Profiler, attaching to BenchmarkDotNet benchmarks, and using the Copilot profiler agent to propose edits. Finds 640,000 zero-length array allocations (~15 MB and nearly 1s of GC pauses), adds a static empty-array to save allocations, and removes a junk array to improve wall-clock by ~14%. Replaces per-field expression compilation with a single compiled block to cut CPU from ~4.2ms to ~3.4ms and validates changes with benchmarks and unit tests.

AI-written summary · about

  1. 0:00Introduction
  2. 1:03Profiler usage poll
  3. 2:06Why profile and pipeline
  4. 5:58Demo setup and CSV Helper
  5. 7:00GitHub Copilot Profiler Agent memory
  6. 10:54Top insights and zero-length arrays
  7. 13:01Agent’s automated fixes
  8. 16:12Memory optimizations impact
  9. 18:23Boxed value type costs
  10. 21:34Memory to CPU demo transition
  11. 21:59Benchmark creation with Copilot
  12. 25:35Customizing benchmarks
  13. 26:17CPU usage profiling
  14. 28:24Hot paths analysis
  15. 29:46Delegate invocation overhead
  16. 33:35Validating improvements
  17. 36:03Edge cases and tests
  18. 37:50Key takeaways
  19. 39:16Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.