Performance Tuning
Study Performance Tuning
Profiling & benchmarking, allocations & GC, database and I/O tuning, caching, async and throughput
Topics
Allocations & Garbage Collection
In .NET, allocation itself is cheap — a pointer bump. What costs is collection, and collection cost is driven by how many objects survive, not by how many you created. That single inversion explains almost everything: short-lived…
Caching, Async & Throughput
Caching is the highest-leverage optimisation available and the one most likely to introduce correctness bugs, because it trades freshness for speed and the bug shows up as "a user saw stale data", not as an exception. Async is the…
Database & I/O Tuning
In almost every business application the database is the bottleneck, and the top three causes are always the same: N+1 queries, a missing index, and fetching far more data than the operation needs. All three are invisible in the C#…
Profiling & Benchmarking
Profiling tells you where time goes in a real workload; benchmarking tells you which of two implementations is faster under controlled conditions. They answer different questions and are not interchangeable. The practical skills are…