Use streaming for large or frequent uploads

Use MultipartReader when buffered ASP.NET Core uploads put too much pressure on memory, temporary-disk capacity, or disk I/O.

July 29, 2026 · 3 min · Lukas Walter

Use async for I/O, not as a substitute for CPU parallelism

Use async to avoid blocking while I/O is in flight, and treat CPU parallelism as a separate measured design decision.

July 28, 2026 · 3 min · Lukas Walter

Project EF Core queries before materializing

Use Select to project only the required values before ToListAsync, reducing transferred columns and unnecessary entity materialization on EF Core read paths.

July 26, 2026 · 2 min · Lukas Walter

AsNoTracking belongs on read paths

Skip EF Core change tracking for queries that only read entity data, but keep tracking for load-change-save updates.

July 12, 2026 · 2 min · Lukas Walter

Use ValueTask only when you know why

Prefer Task unless you have a measured allocation reason and a simple consumption contract.

July 11, 2026 · 2 min · Lukas Walter

Avoid hidden allocations in hot paths

Watch for small per-item allocations inside loops, parsers, serializers, and request paths.

July 5, 2026 · 2 min · Lukas Walter

Measure before you optimize

Use traces, counters, profiles, and focused benchmarks before changing code for performance.

July 5, 2026 · 2 min · Lukas Walter

Prefer keyset pagination for deep lists

Use seek-based pagination when users move through large ordered result sets.

July 5, 2026 · 2 min · Lukas Walter

Start independent tasks before awaiting them

Create unrelated asynchronous operations first, then await them together.

July 5, 2026 · 2 min · Lukas Walter

Use HybridCache when cache stampedes matter

Use HybridCache for expensive shared lookups where many callers can miss at once.

July 5, 2026 · 2 min · Lukas Walter