.NET 10 Preview 4 Delivers Performance Gains and Developer-Friendly Features
The fourth preview of .NET 10 is here, and it’s packed with enhancements aimed at making apps faster, lighter, and easier to build. Released on May 13, this update improves core libraries, runtime performance, and WebAssembly tooling. Developers will see noticeable speedups in GZip stream handling and smarter behavior from the JIT compiler, as well as new diagnostic capabilities for Blazor WebAssembly apps.
A standout improvement in .NET 10 Preview 4 is the optimization of GZipStream
for processing concatenated GZip data. In past versions, each new segment would trigger disposal and reallocation of internal resources, leading to memory churn. Now, with the introduction of inflateReset2
, the system resets and reuses existing handles, reducing memory allocations and improving performance across both managed and unmanaged layers. Preview 4 also adds new asynchronous APIs for Zip archive handling, allowing developers to write more efficient, non-blocking file operations.
On the runtime side, the JIT (just-in-time) compiler gets a boost with expanded escape analysis. This feature now better models references to objects stored in struct fields, allowing the compiler to determine more accurately whether an object needs to be heap-allocated. By allocating more objects on the stack instead, the system reduces overhead and boosts execution speed. Meanwhile, Blazor WebAssembly apps gain new diagnostic tooling—developers can now collect runtime metrics, performance profiles, and memory dumps, helping them fine-tune app behavior and troubleshoot more effectively.
Rounding out the update are enhancements to Blazor WebAssembly templates and JavaScript interop. The standalone app template now includes preload support for state framework assets and generates a JavaScript import map automatically. Developers also gain new methods—InvokeNewAsync
and GetValueAsync
/SetValueAsync
—to simplify calling JavaScript constructors and manipulating JS object properties directly from .NET. With Preview 4 following closely on the heels of Preview 3 in April, Microsoft is clearly accelerating momentum toward .NET 10’s planned general release in November.