Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why can't Visual Studio run on more than one core? CPU at 25%

I'm running Visual Studio 2008 with the stuff-of-nightmares awful MS test framework. Trouble is that it's sending my CPU to 100% (well 25% on a quad-core).

My question is why can't Visual Studio run on more than one core? Surely M$ must have a sufficient handle on threading to get this to work.

like image 270
Iain Holder Avatar asked Sep 10 '08 12:09

Iain Holder


2 Answers

I have VS2008 running on all 4 CPUs. Just set this environment variable / project flag.

/MP

(It can be set in C/C++ Settings, Advanced. In project settings)

Edit: The MP flag can also accept a number, e.g. /MP2 which means it will only run on 2 cores. Leaving it as just /MP means it will run on the maximum amount of cores.

Edit2: The MP flag is probably for the compiler only.

like image 155
Mark Ingram Avatar answered Nov 23 '22 17:11

Mark Ingram


You can ask VS to compile multiple projects in parallel as well as compiling parallelly (!?) within a project.

Tools > Options > Projects and Solutions > maximum number of parallel projects build.

This will build C++ and C# in parallel as well!

like image 33
Colin Desmond Avatar answered Nov 23 '22 18:11

Colin Desmond