Software Engineer
1 month ago, 2280 views
1 month ago, 1722 views
2 months ago, 677 views
2 months ago, 642 views
We're excited that ABP Studio now supports Ready-to-Run (R2R) publishing (starting from v0.9.16+), a hybrid form of ahead-of-time (AOT) compilation. This enhancement significantly improves the startup time and overall performance of ABP Studio, making it faster and more performant than ever before.
Let's dive into what R2R publishing is, how it works, and the benefits it brings to ABP Studio.
Ready-to-Run (R2R) is a form of AOT compilation available in the .NET ecosystem. Unlike traditional just-in-time (JIT) compilation, R2R precompiles parts of your application to native code before deployment. This precompiled code helps reduce the startup time by minimizing the work needed during runtime.
However, R2R isn't a complete AOT compilation. Instead, it's a hybrid approach because it stores both:
Native code for precompiled methods (to improve startup time and performance)
Intermediate Language (IL) code for methods that may need further JIT compilation
This hybrid nature is why R2R binaries are typically larger. For ABP Studio, the storage size increased by ~150 MB with R2R enabled, but the trade-off is well worth it for the performance and startup-time gains.
One of the biggest advantages of R2R publishing is its impact on startup times. In our local tests, enabling R2R resulted in startup times being reduced by 2.5x ⬇️.
This means you can get to work faster, without waiting for the application to being startup from the beginning. Whether you're launching ABP Studio to manage projects, generate code, or deploy applications, the improved responsiveness is noticeable.
In addition to faster startups, R2R publishing contributes to overall performance improvements. By precompiling frequently used methods, R2R reduces the workload on the JIT compiler during execution, leading to smoother and more efficient operations.
With great performance comes a slight trade-off: storage size. R2R binaries include both native and IL code, which increases the file size. In the case of ABP Studio, the storage footprint increased by ~150 MB. However, the substantial improvements in speed and responsiveness make this a worthwhile investment.
If you're developing applications and want to benefit from R2R, here's a quick guide on how to enable it in your .NET projects:
.csproj
file:<PropertyGroup>
<PublishReadyToRun>true</PublishReadyToRun>
</PropertyGroup>
dotnet publish
command:dotnet publish -c Release
Alternatively, you can specify the PublishReadyToRun flag directly to the dotnet publish
command as follows:
dotnet publish -c Release -r win-x64 -p:PublishReadyToRun=true
That's it! Your application will now include precompiled native code for faster startup and great performance benefits.
Please refer to the official documentation before publishing your application with R2R.
As ABP team, we're always looking for ways to improve the developer experience. By adopting Ready-to-Run (R2R) publishing for ABP Studio, we're aiming to deliver a faster and more efficient tool for your development needs.
Stay tuned for more updates and enhancements as we continue to optimize ABP Studio and please provide us with your invaluable feedback.
Great improvement!
Today, ABP 9.0 stable version has been released based on .NET 9.0. You can create solutions with ABP 9.0 starting from ABP Studio v0.9.11 or by usi... Continue Reading
ABP 9.0 release candidate has been released today. Read the blog post to learn all new features in details. Continue Reading
ABP 8.3 stable version has been released today. Read the blog post to learn all new features in details. Continue Reading
We have combined the ABP (open-source) and ABP Commercial (paid) documents into a single, comprehensive resource. This unification brings you a bet... Continue Reading
Today, we are happy to release ABP version 8.3 RC (Release Candidate). This blog post introduces the new features and important changes in this new... Continue Reading
📢 We're excited to introduce the new ABP CLI after the announcement of the new unified ABP Platform. Continue Reading
ABP Framework and ABP Commercial 8.2 versions have been released today. Continue Reading
Today, we are happy to release the ABP Framework and ABP Commercial version 8.2 RC (Release Candidate). This blog post introduces the new features ... Continue Reading
ABP Framework and ABP Commercial 8.1 versions have been released today. Continue Reading
Today, we are happy to release the ABP Framework and ABP Commercial version 8.1 RC (Release Candidate). This blog post introduces the new features ... Continue Reading
Today, ABP Framework and ABP Commercial 8.0 versions have been released based on .NET 8.0. Continue Reading
Today, we are happy to release the ABP Framework and ABP Commercial version 8.0 RC (Release Candidate). This blog post introduces the new features ... Continue Reading
ABP Framework and ABP Commercial 7.4 versions have been released today. Continue Reading
We're excited to introduce to you ABP's CMS Kit Module – a versatile module that empowers you to build your own dynamic content website with ease. ... Continue Reading
Today, we are happy to release the ABP Framework and ABP Commercial version 7.4 RC (Release Candidate). This blog post introduces the new features ... Continue Reading
ABP Framework and ABP Commercial 7.3 versions have been released today. Continue Reading
Today, we are happy to release the ABP Framework and ABP Commercial version 7.3 RC (Release Candidate). This blog post introduces the new features ... Continue Reading
ABP Framework and ABP Commercial 7.2 versions have been released today. Continue Reading
Today, we are happy to release the ABP Framework and ABP Commercial version 7.2 RC (Release Candidate). This blog post introduces the new features ... Continue Reading
Today, we are happy to release the ABP Framework and ABP Commercial version 7.1 RC (Release Candidate). This blog post introduces the new features ... Continue Reading
ABP Framework and ABP Commercial 7.0 versions have been released today. Continue Reading
Today, we are happy to release the ABP Framework and ABP Commercial version 7.0 RC (Release Candidate). This blog post introduces the new features ... Continue Reading
ABP Framework and ABP Commercial 6.0 versions have been released today. Continue Reading
Today, we are happy to release the ABP Framework and ABP Commercial version 6.0 RC (Release Candidate). This blog post introduces the new features ... Continue Reading
ABP Framework and ABP Commercial 5.3 versions have been released today. Continue Reading
Today, we are happy to release the ABP Framework and ABP Commercial version 5.3 RC (Release Candidate). This blog post introduces the new features ... Continue Reading