🎙️ Episode 1705:37October 20, 2025

.Net Performance

Listen to this episode

AI-generated discussion by Alex and Jamie

About this episode

Alex and Jamie unpack .Net Performance — what shipped, why it matters, and how engineers can put it to work today. New episodes weekly.

Transcript

Welcome back to the Nerd Level Tech AI Cast, where we dive deep into the tech that's shaping our world and maybe even the universe. I'm Alex, here to break down the complex and make it digestible. And I'm Jamie, armed with the curiosity of a cat and the humor of, well, also a cat, because why not? Today, we're talking about making .NET apps not just run, but sprint like they've stolen something. It's all about performance, folks. That's right, Jamie. With .NET 9, Microsoft has turned the dial up to 11 on performance. It's not just about speed, it's about efficiency, scalability, and squeezing every last drop of power out of your CPU and memory. So we're talking turbocharged, but without the turbo lag, right? But before we get our hands dirty, let's talk about why performance even matters. Alex, enlighten us. Well, imagine you're building a skyscraper. Performance in .NET is like making sure that skyscraper can withstand earthquakes, has enough elevators, and can accommodate thousands of people without everyone getting stuck in the lobby. Ah, so no one likes a slow elevator or worse, an app that crashes during rush hour. Got it. Exactly. And with .NET 9, we've got some serious upgrades. Things like smarter JIT optimizations, adaptive garbage collection, and something called Tiered Profile Guided Optimization, or PGO, which is now on by default. JIT and PGO. It sounds like alphabet soup to me. Can you break those down a bit? Sure thing. JIT, or Just-In-Time Compilation, means the .NET runtime converts your code into machine language right when it's needed, not before. It's like translating a menu from French to English only when someone who can't read French sits down at the table. And I'm guessing PGO is like the chef knowing I'm going to order the steak before I even walk in so it's ready to go faster. Not a bad analogy. PGO looks at how the app runs over time and optimizes the frequently used paths to make them faster. It's a bit like laying down a faster track for the parts of a race course where the cars spend most of their time. Smart. And I hear .NET 9 also brings improvements to async I-O and threading. That's about not clogging the works, right? Spot on. It's about making sure tasks that can wait, like reading a file or querying a database, don't stop everything else. It keeps the app responsive, almost like a juggler keeping all the balls in the air without dropping any. A juggling act indeed. Now what about this garbage collection thing? Isn't that just taking out the trash? In a way, yes. Garbage collection is about cleaning up memory that's no longer needed. Imagine if every time someone left our skyscraper, we removed their desk. It keeps things tidy and ensures we have space for new arrivals. I love a clean desk. But how do we know where to start optimizing? I mean, I don't want to just start throwing desks out. That's where measuring comes in. Tools like Benchmark.net let you test small pieces of code to see exactly how fast they run and how much memory they use. It's like timing how fast you can clear a desk with different methods, so you know which is the quickest. And I suppose profiling is like watching people work to see where they waste time walking to the printer or the coffee machine. Exactly. Tools like .NET Trace and .NET Counters let us see what's happening in a running app, so we can spot bottlenecks or places where we can improve efficiency. Alright, this is all making sense. But what about making specific .NET applications faster, like say a web API or a mobile app? Great question. For web APIs with ASP.NET Core, it's about optimizing the way the web server, Kestrel, handles requests. Using the latest protocols like HTTP2 or even HTTP3 can make a big difference in handling multiple requests efficiently. And for mobile apps with .NET MAUI, it's about making sure the user interface is snappy and doesn't freeze, right? Precisely. Compiled bindings, async patterns, and keeping heavy lifting off the main thread are key. It ensures the app feels smooth, like a well-oiled machine. I love it when my apps run smoothly. Now before we wrap up, any final tips for our listeners looking to boost their .NET app performance? Start by measuring and understanding where your bottlenecks are. Optimize based on data, not guesses. And remember, performance is a journey, not a destination. It's about continuous improvement. Wise words, Alex. And with that, it's time to close the lid on this performance-packed episode. Thanks for tuning in to Nerd Level Tech AI Cast. We hope you're leaving with some turbocharged knowledge to make your .NET apps fly. And a big thank you from me. Remember, keep optimizing, keep learning, and keep coding. Until next time, keep your tech game strong.