3 ms·
Probably the JIT, I expect this will improve with ahead of time compiling in the newer dotnet sdks.
by fuzzzerd 4y ago
Probably the JIT, I expect this will improve with ahead of time compiling in the newer dotnet sdks.
- ripley12 4y agoFWIW, whenever I've profiled startup of .NET apps the JIT is pretty fast to start up. The only times I've noticed slow startup on recent .NET versions is with WPF apps, and that seems to be mostly because WPF does so much work on startup.
- zigzag312 4y agoIf I'm not mistaken, use of reflection on startup is a major contributor to slow startup. NativeAOT is both JIT free and reflection free.
- neonsunset 4y agoNativeAOT has multiple reflection compatibility modes because most code bases rely on it one way or another. Reflection-free mode works in a limited set of scenarios but greatly reduces the binary size since the compiler and linker can reason much better about which parts of the code they can trim away during compilation.
- zigzag312 4y agoI didn't know about reflection compatibility modes. Thanks! I hope source generators will eventually replace reflection from most libraries, so that reflection-free mode can become more mainstream.