My C#.NET application is running much slower when the exe is located on the network.
And I’m talking about everything, even the graphical dispay is slower. For example: when a form is already loaded, if I unplug my network cable and minimize and maximize the window, it takes a very long time to redraw itself (whether the cable is plugged or not).
I’m using framework .NET 3.5 SP1.
Any idea on the cause?
My hypothesis so far:
- I’m missing some options when building the app?
- my corporate antivirus checks more stuff because the exe is on the network
- the cache of Windows XP SP3 doesn’t work the same way when the exe is on the network
- the server is a Novell server: maybe this does change something ?
Thanks for your help!
Leo
I’m surprised that unplugging makes a difference. I would expect some difference running from a share, though – you get a different security mode, i.e. not full trust. In full trust most of the internal security is simply skipped. Without full trust it works a lot harder. “Fusion” (assembly resolution and loading) also will have to work harder, but this shouldn’t be a problem when repeating operations you’ve already done once in that session (i.e. when the dlls have loaded).
Have you considered deploying (still to a network share) as ClickOnce (
.application)? This should then copy locally automatically and run with a better trust model (and no network performance impact).