.Net 3.5 Windows Forms Application: x86 and x64 boot time on Vista 64-bit

We are developing a Winforms application and optimizing startup times.

The application runs on 64-bit Vista machines. In our testing, we found that it seemed like a counter-intuitive result. All others are equal, targeting 32-bit and 64-bit loads in half the time. Can anyone shed some light on the question of why?

Thank.

[Change] We deploy the application through ClickOnce, which, starting with our research, launches applications in a unique sandbox. Therefore, it is always cold, so the search for better performance here was fruitless.

Our main problem was the existence of 32-bit DLLs in the project. As soon as we set our sights on an x86 project (although it worked on x64), loading time was cut in half. [/ Edit]

+3
windows 64bit windows-vista winforms
Nov 06 '08 at 22:37
source share
3 answers

.NET 3.5 SP1 gets improved bootstrapping by no longer checking the strong name of assemblies that come from trusted locations. A bit controversial in my book, but somewhat justified.

I checked if the 64-bit version of the CLR would not move this time-consuming step. Signed the DLL, put it in the GAC, and then encrypted the byte. There are no complaints when loading the assembly. So this is not an improvement in the SP1 launch prefix, which explains the difference.

Other factors during startup: - Loading the CLR from disk (cold start only) - Crash for dependent assemblies - JIT compiling the startup code

Coldstart may very well be a factor; you probably have no other processes on which the 64-bit version of the CLR is loaded. It is easy to fix by running a dummy .NET application during the test.

Thunder assemblies may take longer for the same reason. It is unlikely that 64-bit ngen-ed .NET collector images are in the file system cache. Again, it is easy to eliminate using a dummy application that is dependent on the same builds.

The 64-bit JITter is a tighter cracking nut. An arbitrary call is to assume that MSFT does not spend so much time for one of the artists to be a 32-bit JITter. Nothing confirmed any evidence. It is difficult to measure too, you would load the assembly with Assembly.Load, then the time Activator.CreateInstance (), where the class constructor calls as much code as possible.

+5
Nov 07 '08 at 21:00
source share

The 64-bit version typically uses twice as much memory on the heap: each pointer takes up twice as much space, and .NET is full of pointers. Since starting up is highly dependent on memory initialization, this may explain some of the additional overhead. See Also Donald's Whip Flame for about 64-bit pointers .

+2
Nov 06 '08 at
source share

Please note that according to Microsoft, .NET 3.5 Service Pack 1 (SP1) included honest work on startup performance (up to 40% improvement for some applications), so you can see if this helps at all.

+1
Nov 07 '08 at 3:27
source share



All Articles