Improving startup time and resources using native AOT
Native AOT produces apps and services that are:
- Self-contained, meaning they can run on systems that do not have the .NET runtime installed.
- Ahead-of-time (AOT) compiled to native code, meaning a faster startup time and a potentially smaller memory footprint. This can have a positive impact when you have lots of instances (for example, when deploying massively scalable microservices) that are frequently stopped and restarted.
Native AOT compiles intermediate code (IL) to native code at the time of publishing, rather than at runtime using the Just-In-Time (JIT) compiler. But native AOT apps and services must target a specific runtime environment like Windows x64 or Linux ARM.
Since native AOT happens at publish time, while debugging and working live on a project in your code editor, it uses the runtime JIT compiler, not native AOT, even if you have AOT enabled in the project! But some features that...