views:

215

answers:

3

I've been trying to improve the build times for my product. We're using continuous integration, and our builds are now taking 2 hours to run.

I've looked at the NANT timings and see alot of places that are slower than they should be, but one that jumps out is the x64 builds of our Visual C++ projects. Here's an example of the timings compared to x86 builds of the same code:

Release Win32: 8' 49" Release x64: 41' 8"

x64 is about 5x slower. Again, this is for the exact same code.

Has anyone else experienced this sort of build time disparity between x86 and x64? Any suggestions for closing the gap?

NOTE: I am aware of tools to improve build performance overall, like Xoreax distributed builds and TeamCity concurrent builds, and I'm going to investigate both of those as well, but I can't help but feel there should be some way to get x64 builds back in line without resorting to third party tools.

+2  A: 

Check if the project build settings are the same for both. When you select x64, VS basically loads new project settings and they can be very well quite different. For example check if incremental building is enabled in x64.

Henri
Good suggestion, but I already checked that. Incremental linking is disabled for both, to support whole-program optimization and link-time code generation, which IIRC are not compatible with incremental linking.In any case, our builds start from a clean source tree, so incremental linking as I understand it doesn't offer much performance improvement
anelson
I looked more closely and discovered that I had turned off precompiled headers for the x64 configuration back when we were using VS 2k5, and never turned it back on when we upgraded to 2k8. Now the build times are much more reasonable.
anelson
A: 

I don't know, but I wouldn't be surprised if the entire code generator was re-written for x64. If you do a test build and use process explorer to look at the DLLs that the compiler pulls in, you'll be able to see if the compiler is using entirely different binaries when building for the two different targets. You might find that the x64 back-end is a managed .NET app, while the x86 one is old school native. Just a guess. Probably not true. You could investigate the CPU/disk/RAM usage of the two while you've got process explorer running.

Andrew Bainbridge
A: 

Any suggestions for closing the gap?

Did you try buying an SSD hard disk? I got an SSD hard disk and managed to close from 8mins to 30secs.

buttercup