7 ms·
The .Net VM compiles its code "just in time", this is compiling "ahead of time" while still running on the .net framework. You're thinking a little more along
by bonesss 9y ago
The .Net VM compiles its code "just in time", this is compiling "ahead of time" while still running on the .net framework. You're thinking a little more along the lines of .net's 'NGEN', used to create native images.
This ahead of time compilation is smart for server solutions where cold start time is an issue, certain kinds of complex projects where start times become an issue, or for small devices where start times are among the biggest usability issues ever.
- ygra 9y agoI thought server stuff is the place where startup time doesn't matter that much compared to interactive applications on the desktop. At least that's historically one of the major difference between the client and server runtimes of both .NET and Java.
- bonesss 9y agoWell, that's a definition question :) You're dead on -- proper "Server" solutions, like we see in architecture diagrams or on back-end tiers, are generally insensitive to startup times. As a rule they're spooled up before being connected to the larger app, or are 'the app' itself and have load balancing or operational pauses to mitigate up-time effects (where necessary). In 2020, though, as people are working with microservices and containerized server deployments you end up with a lot of 'servers' where 'apps' used to be. Particularly for focused web apps initial startup time can be a major issue in a shared environment. That's where NGEN or AOT can come into play to happily minimize startup time and memory demands. Parallel computing and number crunching loads can also benefit if you're looking at lots of short lived servers, or a domain that challenges the compiler for whatever reason.