CLR App Execution Startup Time

Gliddador

Member
Joined
Jan 22, 2023
Messages
22
Programming Experience
5-10
I read that the JVM (Java Virtual Machine) takes a long time to start when running certain applications because the JVM must learn the structure of the application before it can execute it. Does the .NET 7 CLR do anything similar? I hope the CLR is more efficient.

Oh, by the way. I'm new to this forum. I had to put 5-10 years of experience because it was the only honest option; however, that experience has not been quality experience. So I'm not that good yet. Also, I've gotten rusty.
 
Take the following with a lot of hand waving instead of in depth precise details:

The JVM validates the entire .JAR file contents and dependecies before starting to do the JIT (just-in-time) compilation to native machine code. The CLR does a file integrity check if the assembly is authenticode signed or if it strongly signed, but this integrity check is just a file hash check. Then it will start it's JIT compilation. While doing the JIT, it will start looking for dependencies and doing integrity checks on those as they are loaded and JIT'ed. The CLR has NGen.exe which compiles assemblies to native ahead of time too skip the JIT step. Newer versions of the C# compiler also support AOT compilation. I was under the impression that the JVM was also going to support AOT, but I don't have enough up to date information about it.

Recently, not many people seem to be doing strongly signed assemblies anymore, unless they intend to put their code in the GAC to be able to make their objects visible to COM.
 
Back
Top Bottom