Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why my .net application horribly slow to start after the machine is rebooted?

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 ?

like image 201
SharpUrBrain Avatar asked May 18 '11 09:05

SharpUrBrain


2 Answers

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.

like image 121
Lars Truijens Avatar answered Oct 12 '22 22:10

Lars Truijens


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?

like image 36
John Warlow Avatar answered Oct 12 '22 23:10

John Warlow