Performance
7 posts tagged “Performance”.
November 2026
-
Slow and busy: diagnosing a .NET API that's running hot
Your API is slow in Kubernetes, and this time someone says CPU is pinned or memory keeps climbing. You still only have the logs, and they can still tell you a lot.
-
Slow but not busy: diagnosing a .NET API from its logs
Your API is timing out in Kubernetes, someone says CPU and memory look fine, and all you have is the application's logs. That's often enough to find the cause, if you know what to look for.
October 2026
-
When one EF Core query returns a million rows
Including two collections in one EF Core query can multiply the rows SQL Server sends back. Split queries fix it, with one trade-off you should know about.
August 2026
-
Parse text without allocating with Span<T>
Splitting a line with
string.Splitcreates a new string for every field. For large files,ReadOnlySpan<char>lets you parse the same data with almost no allocations. -
MongoDB indexes from C#, and how to know you need one
A query that's fast with a thousand documents can scan millions in production. Here's how to create indexes from the C# driver, order their fields, and check that queries actually use them.
March 2026
-
Faster JSON with System.Text.Json source generation
By default, System.Text.Json uses reflection to work out how to serialize your types. A source generator can do that work at compile time instead, for faster startup and trimming support.
December 2025
-
ValueTask: when to use it and when not to
ValueTask<T>can save an allocation on hot paths. It also comes with rules thatTaskdoesn't have, and breaking them causes bugs that are hard to trace.