Why does it take so long to launch a VS.NET app?

panuvin

Member
Joined
Jul 18, 2005
Messages
5
Location
South Florida
Programming Experience
5-10
Hello everyone, I'm new to the forums and hopefully I'm posting to the correct forum.

I've been wondering this for quite some time, why it takes so long to start/launch compiled Windows Forms applications from VS.NET 2003/2005 (C# or VB.NET)? Even if I create a new Windows Forms application with no additional code and compile the program, it still takes about seven to fifteen seconds to launch the app. The best I can figure that this is because Microsoft utilizes a runtime environment similar to Java's so it's almost as slow as emulation. Does anyone know of a way to speed up the time for an app to run? Otherwise, is there a way to quickly load a start-up screen with a progress bar to let the user know the program is loading. Any help would be greatly appreciated!

Thanks in advance,

Panuvin
 
it does take a few seconds to load the JIT compiler and have it start interpreting the code, which is why it takes a few seconds to load the app. also any data that needs to be read before showing the startup form will add more time to the loading process

it does work similiar to java
 
Another considerations:

  1. 1 On the Project Property Page, set the configuration to Release (if you want to create the final release application).
  2. 2 Still on the Project Property Page, under the Optimization, set the Enable Incremental Build to True

Some others idea should be expected...
 
At load time, your application is compiled into a native format. You can minimize this step by running the ngen.exe tool before running the application. This can reduce your load time.
 
Last edited:
NGen.exe is what you need to be looking at here. You can add an installer to yuor project so that a native image is created during the install and it is transparent to the user. Load time should be improved by as much as 700%
 
Back
Top