PDA

Click to See Complete Forum and Search --> : Design and Application Startup Speed?


VBCrazyCoder
May 22nd, 2003, 10:01 AM
Is there a way to design an application so that it starts up right away. The problem I am having is that my Windows application contains about 40 classes (about 20 forms) and references about 7 custom dll's in addition to the default ones. It takes about 13 seconds for the application to start and the main screen to be displayed. The hour glass that windows gives you even goes away after about 3 seconds, so the user is inclined to click the icon again to try and open it again - thus getting multiple versions of the application when it finally loads.

I tried to put up a splash screen - the first thing that I do in Sub Main, but this is only loaded when the application loads.

When the user clicks on the icon, does the exe have to load all of the classes and dll's into memory before it can execute anything? I am not sure why it takes so long - any ideas on how to impove speed (using the GAC did not seem to help)???

hellswraith
May 22nd, 2003, 11:01 AM
Is it that slow the first time running it after compiling? Did you run it again to see the speed difference?

When a .net app is first ran, it is compiled to machine code. This is probably where your delay is coming from. After this first load though, your computer should have a copy of the compiled version in the cache, and it will use that to run. Try that, see if that is what is happening.

VBCrazyCoder
May 22nd, 2003, 11:07 AM
No - this is repeatedly happening - on every attempt to run the exe. (It is actually a VB.NET Windows Application).

The thing is that we have one machine that it is super fast on - but everyone elses (having the exact same exe) is super slow!

Cander
May 22nd, 2003, 12:44 PM
Make sure the machine has a user account name ASPNET and has Admin privilages

VBCrazyCoder
May 22nd, 2003, 02:40 PM
ASP.NET is set up correctly - I don't see how that would make a difference in startup performance though.

VBCrazyCoder
May 22nd, 2003, 03:07 PM
The ASPNET user account thing was supposedly fixed in SP2 (framework 1.1) anyway. But that doesn't seem to be my problem anyway :(

VBCrazyCoder
Jun 3rd, 2003, 08:21 AM
Oh, by the way, it was the security setting cache. I reset it by executing in the VS.NET command prompt "caspol -f -reset".

That took a 20 second startup down to 1 sec! Sweet!