Very slow compile times on Visual Studio 2005
I had a similar issue on a solution with 21 projects and 1/2 million LOC. The biggest difference was getting faster hard drives. From the performance monitor the 'Avg. Disk Queue' would jump up significantly on the laptop indicating the hard drive was the bottle neck.
Here's some data for total rebuild times...
1) Laptop, Core 2 Duo 2GHz, 5400 RPM Drive (not sure of cache. Was standard Dell inspiron).
Rebuild Time = 112 seconds.
2) Desktop (standard issue), Core 2 Duo 2.3Ghz, single 7200RPM Drive 8MB Cache.
Rebuild Time = 72 seconds.
3) Desktop Core 2 Duo 3Ghz, single 10000 RPM WD Raptor
Rebuild Time = 39 seconds.
The 10,000 RPM drive can not be understated. Builds where significantly quicker plus everything else like displaying documentation, using file explorer was noticable quicker. It was a big productivity boost by speeding the code-build-run cycle.
Given what companies spend on developer salaries it is insane how much they can waste buy equiping them with the same PCs as the receptionist uses.
We have nearly 100 projects in one solution and a dev build time of only seconds :)
For local development builds we created a Visual Studio Addin that changes Project references
to DLL references
and unloads the unwanted projects (and an option to switch them back of course).
- Build our entire solution once
- Unload the projects we are not currently working on and change all project references to DLL references.
- Before check-in change all references back from DLL to project references.
Our builds now only take seconds when we are working on only a few projects at a time. We can also still debug the additional projects as it links to the debug DLLs. The tool typically takes 10-30 seconds to make a large number of changes, but you don't have to do it that often.
Update May 2015
The deal I made (in comments below), was that I would release the plugin to Open Source if it gets enough interest. 4 years later it has only 44 votes (and Visual Studio now has two subsequent versions), so it is currently a low-priority project.
The Chromium.org team listed several options for accelerating the build (at this point about half-way down the page):
In decreasing order of speedup:
- Install Microsoft hotfix 935225.
- Install Microsoft hotfix 947315.
- Use a true multicore processor (ie. an Intel Core Duo 2; not a Pentium 4 HT).
- Use 3 parallel builds. In Visual Studio 2005, you will find the option in Tools > Options... > Projects and Solutions > Build and Run > maximum number of parallel project builds.
- Disable your anti-virus software for .ilk, .pdb, .cc, .h files and only check for viruses on modify. Disable scanning the directory where your sources reside. Don't do anything stupid.
- Store and build the Chromium code on a second hard drive. It won't really speed up the build but at least your computer will stay responsive when you do gclient sync or a build.
- Defragment your hard drive regularly.
- Disable virtual memory.