So after a couple years of putting up with very slow build times, i
couldn't take it anymore. We're preparing to migrate to VS2005 for
primary C++ development, and a 20x increase in the time needed for a
full build just isn't gonna cut it. So i started going through the
options, hoping there was an option or something, hoping that they
hadn't made the compiler itself that much slower in the process of adding new features and increasing standards compliance.
Sure enough, there was a simple solution. Seems the "automatic" option
for using pre-compiled headers isn't available anymore, and so during
the conversion PCH was just turned off for all projects.
At this point, i'm going to admit that i've never given too much
thought to PCH support in VC++. The only other time i've used PCH at
all was with Borland's C++ compiler, where manually specifying what you
wanted pre-compiled was the only option (at the time anyway). That It
Just Worked on VC++ was enough for me - why mess with what works? But
the downside was, i didn't have a very clear idea of what was actually
going on. Put the system headers in STDAFX.H, rebuild all, check in and
forget it. Upon realizing that this was no longer an option, i didn't
really know what to do...
Then i found Bruce Dawson's excellent article on the subject. Going well beyond MSDN's dry descriptions of how, Bruce details the various methods for configuring, optimizing, and using PCH in VC++.
With this, i enabled PCH manually on our various projects, and brought
build times back down to something acceptable (roughly 1.5x what it
takes in VS6). VS2K5 is usable at last!
Now, if i could just do something about that annoying "Updating Intellisense..."
Thursday, March 2. 2006
Faster C++ compilation on VS2005
Trackbacks
Trackback specific URI for this entry
No Trackbacks

