Results 1 to 7 of 7

Thread: Design and Application Startup Speed?

  1. #1

    Thread Starter
    Fanatic Member VBCrazyCoder's Avatar
    Join Date
    Apr 2003
    Posts
    681

    Design and Application Startup Speed?

    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)???

  2. #2
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    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.

  3. #3

    Thread Starter
    Fanatic Member VBCrazyCoder's Avatar
    Join Date
    Apr 2003
    Posts
    681
    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!

  4. #4
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    Make sure the machine has a user account name ASPNET and has Admin privilages
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  5. #5

    Thread Starter
    Fanatic Member VBCrazyCoder's Avatar
    Join Date
    Apr 2003
    Posts
    681
    ASP.NET is set up correctly - I don't see how that would make a difference in startup performance though.

  6. #6

    Thread Starter
    Fanatic Member VBCrazyCoder's Avatar
    Join Date
    Apr 2003
    Posts
    681
    The ASPNET user account thing was supposedly fixed in SP2 (framework 1.1) anyway. But that doesn't seem to be my problem anyway

  7. #7

    Thread Starter
    Fanatic Member VBCrazyCoder's Avatar
    Join Date
    Apr 2003
    Posts
    681
    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!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width