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

会有一股神秘感。 提交于 2019-12-19 07:51:48

问题


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 ?


回答1:


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.




回答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?




回答3:


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.




回答4:


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.



来源:https://stackoverflow.com/questions/6042555/why-my-net-application-horribly-slow-to-start-after-the-machine-is-rebooted

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!