Which PC components make the biggest impact on your compile times for Visual Studio?

16

5

Which PC specifications have the biggest impact on your compile times? Disk? Clock speed? Number of CPU cores?

Rob Allen

Posted 2009-07-30T19:39:50.193

Reputation: 1 849

1Isn't this a programming question? Would it have a bigger audience on StackOverflow? – Kurt W. Leucht – 2009-07-30T20:52:41.843

Answers

9

Scott Gu also posted about what affects building speed, pointing mainly to I/O resources such as the hard disk.

http://weblogs.asp.net/scottgu/archive/2007/11/01/tip-trick-hard-drive-speed-and-visual-studio-performance.aspx

lyngbym

Posted 2009-07-30T19:39:50.193

Reputation: 328

13

The factor that I've found makes the biggest difference isn't a physical factor, but a software one: Which anti-virus do you have installed?

Some anti-virus products don't handle software development very well - they see all these application files being rewritten, suspect foul-play and rescan every file every time.

(See https://stackoverflow.com/questions/1170078/is-it-usual-for-aspx-files-to-take-5-10-seconds-to-save/1170129#1170129 for more.)

On the other hand, if you're wanting to improve the performance of an existing machine, nothing beats maxing out available memory for a quick win.

Bevan

Posted 2009-07-30T19:39:50.193

Reputation: 1 162

PC in the office is using the TrendMicro OfficeScan. My dev laptop at home is using AVG 8. – Rob Allen – 2009-07-30T20:05:26.340

3"Trend Micro". Oh dear. If you can't get that changed for something else, kiss goodbye to any performance at all. – Bevan – 2009-07-31T02:53:47.940

8

Here's some nice research from Scott Hanselman on using multiple CPUs for MSBUild. The speed-ups are pretty dramatic.

Edit: I should note however, that in order to have a good experience using Visual Studio, you need plenty of RAM. :)

JP Alioto

Posted 2009-07-30T19:39:50.193

Reputation: 6 278

+1 Good article on the topic. I forgot about that. I think he also did a podcast regarding this. – BinaryMisfit – 2009-07-30T19:46:42.237

4

My personal experience with a fair-sized C++ code base:

Old machine

Processor: Pentium 4 HT 3.06 GHz
Memory: 1 GB DDR RAM (PC 2100, so 333 MHz)
Disk: 7200 RPM hard drive (UDMA 100, if memory serves)
Compile time: 50 minutes

New machine:

Processor: Core i7 720QM (8 logical processors) at 1.6 GHz, turbo boost to 1.73 GHz when all cores are active
Memory: 8 GB DDR3 RAM at 1066 MHz
Disk: 7200 RPM hard drive (SATA 2)
Compile time: 4 minutes (with /MP)


Conclusion: The more processors, the merrier -- even at relatively low clock speeds. An SSD would improve times further, but from observation of the compilation messages, I doubt it would improve it by more than 30 seconds or so.

mmyers

Posted 2009-07-30T19:39:50.193

Reputation: 388

3

As far as I remember mainly Processor and Memory. A quick google did reveal various tweaks that can improve compile times.

Joel recently posted about the effect of Solid State Disks on compiles here. Disk speed does generally not improve compile time drastically. However according to this it does have an effect as pointed out by lyngbym.

BinaryMisfit

Posted 2009-07-30T19:39:50.193

Reputation: 19 955

1

Xoreax IncrediBuild is a distributed build system that has made a huge improvement on compile times where I work. (Unfortunately, link times are still pretty long, particularly release builds using whole-program optimization and link-time code generation, but that's to be expected.)

alt text

bk1e

Posted 2009-07-30T19:39:50.193

Reputation: 1 579

1

For building C++ programs, the #1 factor before all else is structural - if the source code is heavily vertically structured, it will have a devastating impact on build times, especially incremental builds. I locally restructured a few portions of a project for a dramatic improvement on a quad-core Xeon. 18 months later and they (the people who own the project) still can't match my wall-clock build times even on Core i7 machines.

The effect (positive or negative) of your software layout multiplies across every member of your team and every build they perform.

Sam Harwell

Posted 2009-07-30T19:39:50.193

Reputation: 6 762

Do you have a link that describes different code structures please. I think I know what you are referring to but I'm not certain. – Rob Allen – 2009-08-11T18:07:14.847

I'm having trouble finding my references, but the general idea is 1) use forward declarations where possible, 2) include files only when a forward declaration won't work, and 3) make sure the file you include doesn't declare more things than necessary, which in turn could make it include more files you don't otherwise need for the particular source file being compiled (aka keep your headers small and use forward declarations in them just like you do for source files). – Sam Harwell – 2009-08-11T19:01:15.503