Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multi-process builds in Visual Studio 2010: Worth it?

I've started testing our C++ software with VS2010 and the build times are really bad (30-45 minutes, about double the VS2005 times). I've been reading about the /MP switch for multi-process compilation. Unfortunately, it is incompatible with some features that we use quite a bit like #import, incremental compilation, and precompiled headers.

Have you had a similar project where you tried the /MP switch after turning off things like precompiled headers? Did you get faster builds?

My machine is running 64-bit Windows 7 on a 4 core machine with 4 GB of RAM and a fast SSD storage. Virus scanner disabled and a pretty minimal software environment.

Edit: Martin and jdehaan pointed out that MP is not incompatible with precompiled headers. Details are here.

like image 528
criddell Avatar asked Feb 27 '23 23:02

criddell


2 Answers

Are you sure that pch is incompatible with /MP?
You could certainly do a multi-core build on vs2008 with pch (although oddly only from within the IDE not on the commandline)

like image 101
Martin Beckett Avatar answered Mar 01 '23 12:03

Martin Beckett


Definitely YES. I worked on a large application which took around 35 minutes to build when something was modified (In Visual Studio). We used IncrediBuild for that (to speed up the compilation process, from 35 minutes to 5 minutes) - to be truly distributed. In your case it is possible that /MP switch will make some difference - but not that much compared to distcc (unix or compatible environment) or IncrediBuild.

like image 39
INS Avatar answered Mar 01 '23 13:03

INS