0

I have noticed that when I install a new .NET program (using msi file) on a slow computer, this program needs a lot of time for its first execution. Once the first run is done, if I restart the same program, execution time is normal (even after restarting the computer). So, it seems that during the very first execution, some special treatment is done by the CLR.

Any ideas about the cause of this phenomenon ?

2
Contributors
1
Reply
2
Views
4 Years
Discussion Span
Last Post by deceptikon
1

.NET programs aren't compiled to machine code as part of the assembly, they're in an intermediate state (IL assembly language) that the framework needs to compile into machine code. On the first run of an assembly, the just-in-time (JIT) compiler does all of that, which is why it's slower than subsequent executions.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.