The latest release of .NET 8 includes significant additions and changes. ASP.NET Core. The most notable enhancements in this release of ASP.NET Core are related to performance and Blazor, in addition to updates regarding AOT, Identity, SignalR, metrics, and many other features.
Microsoft announced that ASP.NET Core in .NET 8 is the highest performing version ever released. As mentioned earlier, ASP.NET Core in .NET 8 is 18% faster and 24% faster on the Techempower JSON benchmark when compared to .NET 7. % faster on the Fortunes benchmark. Brennan Conroy wrote the following blog post ASP.NET Core 8 performance improvements Readers are encouraged to consider this.
ASP.NET performance was a hot topic on Reddit, with users saying: seslibias asked an interesting question How is Asp.net so fast? This thread is rich with community discussions, but the most interesting are those written by: david fowler.NET Distinguished Engineer says:
Not everything is well documented in one place like the fasthttp repository. Simply put, the team is completely focused on performance. It’s not a tangible change, but it’s their performance culture that has led to dramatic performance improvements and breakthroughs with each release.
And at the end of a longer, more detailed answer:
This is a marathon, not a sprint, and one of our “eternal priorities” as part of the .NET Charter. .NET performance investments directly save Microsoft $$$ by enabling teams to do more with less. In other words, we will continue to work on improving performance as our top priority.
I highly recommend that all readers take a look. complete answer Written by David and other community members.
When it comes to features and improvements, one of them is Native AOT This feature is specifically tailored for cloud native API applications and enables you to expose ASP.NET Core apps using native AOT, resulting in self-contained applications that compile to native code.
This has several advantages. First, by producing a single executable file that incorporates a subset of code from the program and external dependencies, the disk footprint is significantly reduced. This reduction in executable file size results in smaller container images, faster deployment times, and improved overall startup efficiency.
Additionally, native AOT applications have faster startup times due to the elimination of just-in-time (JIT) compilation. This faster startup improves responsiveness to service requests and provides smoother transitions when managed by a container orchestrator.
Additionally, ASP.NET Core apps published with native AOT are Reduced memory demandsThis is because the new DATAS GC mode is enabled by default. This reduction in memory consumption contributes to increased deployment density and scalability.
The release of .NET 8 is blazerconverting a promising client Web UI framework into a comprehensive full-stack Web UI solution that can address a wide range of Web UI requirements.
What’s new in Blazor This includes static server-side rendering, enhanced navigation and form handling, streaming rendering, and the ability to enable per-component or per-page interactivity.of @rendermode Razor directives make it easy to choose rendering modes at runtime, allowing automatic switching between server and client, and optimizing your app’s load time and scalability.
.NET 8 brings significant improvements to running .NET code in WebAssembly.Introduction of jitter splitterThe base runtime improves performance, rendering components 20% faster and JSON deserialization 2x faster.
of .NET Web Assembly The runtime now supports multiple new editing types with hot reload, providing full parity with CoreCLR’s hot reload functionality and enabling editing of generic types. Additionally, a new web-friendly packaging format for Blazor WebAssembly apps, called WebCIL, streamlines deployment by removing Windows-specific elements from .NET assemblies and repackaging them as WebAssembly files.
ASP.NET Core in .NET 8 introduces the following API endpoints: ASP.NET Core Identity, provides programmatic access to user registration and login functionality. This simplifies setting up authentication for browser and mobile client apps and supports both cookie-based and token-based authentication.
This update also introduces rich runtimes ASP.NET Core Metrics using System diagnostic metrics, a cross-platform API developed in collaboration with the OpenTelemetry community. These metrics provide a robust monitoring system that offers new types of measurements with counters, gauges, and histograms, along with powerful reporting capabilities featuring multidimensional values.
Integration into the broader cloud-native ecosystem open telemetry This ensures seamless compatibility and enhanced monitoring capabilities for ASP.NET Core applications.
The .NET 8 release packs a lot of changes and updates, others related to: MVC generic attributes, Enhanced form binding For minimal API and anti-counterfeiting middleware, Signal R stateful reconnection, With a key Service support for dependency injection.
Additionally, there are performance improvements. named pipe kestrel transport, named pipe A technology for building interprocess communication (IPC) between Windows apps. ladies–based output caching support was also added.
Output caching is a feature that allows an app to cache the output of a minimal API endpoint, controller action, or Razor Page. For comprehensive and more detailed content, we recommend that readers refer to it. Official release notes page.
lastly, Comment section The blog post for the original release has been a hot topic of feedback regarding changes and enhancements to the framework. This blog post received quite a response, with users asking numerous questions and participating in discussions with the development team. To gain insight into different perspectives and more detailed answers, we strongly encourage users to visit the comments section and join the ongoing discussion.