Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reduce startup time of .NET windows form app running off of a networked drive

I have a simple .NET 2.0 windows form app that runs off of a networked drive (e.g. \MyServer\MyShare\app.exe). It's very basic, and only loads the bare minimum .NET libraries. However, it still takes ~6-10 seconds to load. People think something must be wrong that app so small takes so long to load.

Are there any suggestions for improving the startup speed?

like image 373
Jim Avatar asked Oct 29 '25 17:10

Jim


2 Answers

Try out Sysinternals Process Explorer. It has an column of "% time in JIT". If that number is large you could run ngen on your application. If it's not it's likely to be a slow network connection. CodeGuru has a tutorial on usage of ngen.

like image 103
hometoast Avatar answered Nov 01 '25 06:11

hometoast


To speed up load time, you can compile a tiny start application and let that application do the loading of assemblies in runtime from a library outside bin folder.

http://support.microsoft.com/kb/837908

like image 20
Claus Thomsen Avatar answered Nov 01 '25 06:11

Claus Thomsen