Memory discipline and GC awareness in .NET

#616 – July 12, 2026

avoid frequent collection cycles causing latency spikes and wasted CPU time

Memory discipline and GC awareness in .NET
8 minutes by Bipin Joshi

.NET apps rely on garbage collection, but frequent collection cycles cause latency spikes and wasted CPU time. Short-lived objects that survive a collection get promoted to more expensive memory tiers, quietly hurting performance under load. Tools like dotnet-trace and BenchmarkDotNet help find the real sources of memory pressure. Practical fixes include using structs, Span, ArrayPool, and ValueTask to cut unnecessary allocations and keep collections rare.

GitHub Copilot is now a native AI agent in Rider
sponsored by Jetbrains

Copilot is everywhere on the .NET stack, and now it's a native AI agent in JetBrains Rider. It's in the agent picker by default, so you don't have to worry about ACP Registry setup. It's more stable and thoroughly tested, and Copilot CLI slash commands like /remote and /chronicle work in the AI chat. Simply connect with OAuth and pick your model. An active GitHub Copilot subscription is required.

Zero-code validations in your .NET API
7 minutes by Pavel Kalandra

Pavel explains how strong types can replace repeated validation in .NET APIs. Instead of checking the same values in multiple layers, inputs are converted once into types that guarantee valid data. This reduces duplicate code, improves readability, strengthens type safety, and makes APIs easier to maintain. The approach also works with JSON, OpenAPI, Entity Framework Core, and testing with minimal setup.

Getting inherited controller routes to work in ASP.NET Core
13 minutes by Rick Strahl

Inheriting ASP.NET controllers with attribute routes can cause duplicate route errors. When a concrete base controller class is subclassed, ASP.NET registers routes from both the base and child classes, causing ambiguous route failures. Using an abstract base class prevents this, as ASP.NET skips abstract classes during route scanning. For concrete base classes, you can implement IActionDescriptorProvider to detect and remove the duplicate base class routes after ASP.NET completes its route discovery.

Improvements to reading process outputs
12 minutes by Andrew Lock

.NET 11 adds new APIs that make reading output from child processes much safer and simpler. Earlier versions made it easy to accidentally cause deadlocks when reading stdout and stderr. New methods like ReadAllText, ReadAllLines, and RunAndCaptureText handle the complexity for you, covering both simple capture scenarios and cases where you need to react to output as it arrives.

The N+1 query problem in EF Core
23 minutes by Chris Woodruff

Loading 200 database rows can silently trigger 201 queries when navigation properties are accessed in a loop. This is the N+1 problem, and it shows up in four forms: lazy loading loops, explicit query loops, serializer storms, and write-side save loops. The fix starts with counting queries using an interceptor, then setting a query budget in your tests.

And the most popular article from the last issue was:

newsletters