5

Does anyone know why it is so horribly slow to start a .net application after the machine is rebooted(i.e cold start) ?

After researching in google I found some clues for speeding it up i.e.

  1. Merging assemblies
  2. Setting resource language
  3. NGEN
  4. GAC installation, etc.

Is that all enough to make my .net application faster or anything else is there I am missing ?

SharpUrBrain
  • 3,180
  • 5
  • 38
  • 56
  • 8
    - Knock, knock. -Who's there? (long delay....) -Dot Net. :-) – Dariusz May 18 '11 at 09:54
  • What kind of application is it, forms/WPF/Console... How do you know it is the framework that is slow to start? What is your code doing up to your measuring point? – adrianm May 18 '11 at 10:28
  • @adriamn: its a windows application used WPF, and forms also. First I thought it is because of my WPF codes, so I omitted most of unnecessary controls I used but still it is happening same, and I think its not due to my system configuration beacause I am trying to launch my application by waiting near about 20-30 minutes – SharpUrBrain May 18 '11 at 14:45

4 Answers4

4

Another reason could be Authenticode signed assemblies and no internet connection. See Why are signed assemblies slow to load? and WPF application slow on startup for example.

Community
  • 1
  • 1
Lars Truijens
  • 42,837
  • 6
  • 126
  • 143
2

You could use ProcMon from SysInternals to profile your app during startup. This will log all registry/file access with time stamp. It may point you in an area where there's a delay.

Also, when cold booting, does your machine have a lot of disc access? Is your virus scanner doing a full scan at boot?

John Warlow
  • 2,922
  • 1
  • 34
  • 49
  • 1
    No, I am using this with my normal system without any start up applications and after the system get stable I am running my application and this problem I am facing – SharpUrBrain May 18 '11 at 09:40
0

If you are pulling up a large number of files from the hard drive, then your system hasn't loaded them yet. This could be the reason for the slow start.

Also, if you haven't given your system sufficient time to boot up, it could still be loading other applications at the same time.

Chuck Savage
  • 11,775
  • 6
  • 49
  • 69
0

As others have stated, your computer is probably still loading other applications during the first few minutes after bootup. Your hard disk (one of the slowest components) is busy trying to load those other apps and their respective data.

If you have a second disk on your computer, try installing your app on the second disk. If the second disk is usually idle during this time, I'm thinking that the app will start up much more quickly.

Giovanni Galbo
  • 12,963
  • 13
  • 59
  • 78