Deep dive into .NET performance and native AOT
summary
Upgrading to the latest .NET gives free perf gains, but the session shows concrete fixes: use Bombardier for load baselines, the Visual Studio profiler for CPU and allocation traces, then cut allocations (frontend strings/byte arrays drop from ~28 MB to ~3 MB) and reduce backend work with AsNoTracking, keyset paging, compiled queries, DbContext pooling and model precompilation. Result: backend throughput rises ~2,800 → ~5,389 RPS. Native AOT produces ~16 MB single-file exes and cuts cold-start first-request time ~1.2s → ~188 ms, with the caveat that Razor/EF/MVC aren’t fully supported yet.
AI-written summary · about
chapters (11)
- 0:00Introduction and Benchmarks
- 2:55Application Overview
- 5:28Performance Profiling
- 8:15Identifying Bottlenecks
- 14:03Front-end Optimizations
- 19:43Verifying Front-end Fixes
- 21:56Backend Profiling
- 24:35EF Core Optimizations
- 33:05Backend Optimization Results
- 35:55Introduction to Native AOT
- 42:35AOT Results and Summary
related talks
47mUnlocking Performance Improvements in .NET
48mWhy I’m Not Leaving .NET
59mPerformance tricks I learned from contributing to open source .NET packages
44m.NET 11 in depth: Runtime, libraries, and SDK for the AI era
37mRock Your Code Code and App Performance for Microsoft .Net
47mSolving .NET performance issues
01h 14mKeynote
51mPushing C# to new places with NativeAOT
