Latest preview of Microsoft’s application development platform also brings improvements for the F# language and Windows Presentation Foundation. Credit: Shutterstock With the fourth preview of the planned .NET 10 software development platform, Microsoft has delivered a variety of enhancements to the platform’s libraries, runtime, and frameworks, including faster processing of GZip data streams and escape analysis for local struct fields in the JIT compiler. .NET 10 Preview 4, announced May 13, is downloadable from dotnet.microsoft.com. Among the library improvements, .NET 10 Preview 4 boosts performance and memory usage of GZipStream when processing concatenated GZip data streams. Prior to this, each new stream segment would dispose and reallocate the internal ZLibStreamHandle; this resulted in additional memory allocations and initialization overhead. With this change, the handle now is reset and reused using inflateReset2, reducing both managed and unmanaged memory allocations and improving execution time. Preview 4 also introduces asynchronous APIs for working with Zip archives, making it easier to perform non-blocking operations when reading from or writing to Zip files. For the .NET runtime, .NET 10 Preview 4 expands the JIT compiler’s escape analysis abilities to model references to objects from struct fields. The JIT performs escape analysis to determine if an object can outlive its parent method; if not, the JIT can allocate the object on the stack, removing the overhead of placing and tracking an object on the heap. Preview 4 also lets developers can collect runtime diagnostic information from Blazor WebAssembly apps, including performance profiles, memory dumps, and runtime metrics. Also in .NET 10 Preview 4, the Blazor WebAssembly Standalone app template has been updated to enable preloading of state framework assets, include a generated JavaScript import map. And developers can use the new InvokeNewAsync and GetValueAsync/SetValueAsync methods to call JavaScript constructors and properties from .NET. .NET 10 Preview 4 follows Preview 3 from April 10, Preview 2 from March 18, and Preview 1 from February 25. The general production release of .NET 10 is expected in November. Other new features and improvements in .NET 10 Preview 4 include: For the .NET Activity class, Preview 4 supports serializing tracing data out-of-process using the Microsoft-Diagnostics-DiagnosticSource event source provider. It also adds support for serializing ActivityLink and ActivityEvent metadata. Also for the .NET Activity class, a new sampling option called Rate Limiting Sampling restricts the number of root activities serialized per second, providing more precise control over data volume. For the F# language, handling of generic unmanaged structs has been improved. For .NET for Android, the Android workload previously installed a copy of Mono.Android.dll per architecture, even though the contents of each of these files were identical. This duplication has been removed. For Windows Presentation Foundation, performance has been optimized across font rendering, dynamic resources, input composition, trace logging, regex usage, and XAML parsing. Further, redundant allocations have been removed and core internals streamlined for improved efficiency.