Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Will more CPUs/cores help with VS.NET build times?

I was wondering if anyone knew whether Visual Studio .NET had a parallel build process or not? I have a solution with lots of projects, every project has lots of markup/code, lots of types, etc. Just sitting there with intellisense on runs it up to about 700MB. But the build times are really slow and only seem to max out one of my two cpu cores.

Does this mean the build process is single threaded? My solution's build dependency chain isn't linear, so I don't see why it couldn't be building some of the projects in parallel. I remember Joel Spolsky blogging about his new SSD, and how it didn't help with compile times, but he didn't mention which compiler he was using. We're using VS 2005. Anyone know how it's compilation works? And is it any different/better in 2008/2010?

EDIT: Lots of good responses, here, but I'm interested specifically in C# and ASP.NET. No love for us web folks?

like image 966
LoveMeSomeCode Avatar asked Apr 05 '10 14:04

LoveMeSomeCode


People also ask

Does Visual Studio benefit from multiple cores?

Visual Studio has the option of choosing number of maximum parallel builds - they use as many CPU cores as you wish.

Is it better to have more cores or higher GHz?

A high clock speed means faster processor. For instance, a quad-core processor may support a clock speed of 3.0GHz, while a dual-core processor may hold a clock speed of 3.5 GHz for every processor. This means that a dual-core processor can run 14% faster.

How does the number of cores affect CPU performance?

Having more cores means your CPU is able to understand instructions of multiple tasks, while optimal single threading means it's able to process each of those individually, and really well. Video games are about transporting you to another world and giving you the chance to explore new territory.

Is more cores better for gaming?

When a CPU has more than one core, each core gets treated as a separate CPU and allows it to process multiple tasks at once. Each core can work on a different task so generally speaking, more cores will allow you to multitask and game faster and smoother.


1 Answers

MSBuild (which VS uses to do builds, from 2005/.NET2) supports parallel builds. By default VS will set the maximum degree of parallelism to your number of processors. Use Tools | Options | Projects and Solutions | Build and Run to override this default.

Of course any one build might have more limited (or no) capacity to allow parallel builds. E.g. only one assembly in a solution provides no scope to build in parallel. Equally a large number of assemblies with lots of dependencies might block parallelism (A depends on B, C depends on A&B, D depends on C has no scope for parallel builds).

(NB. for C++, in VS 2005 & 2008 uses its own build system, in 2010 C++ will also be built with MSBuild.)

like image 160
Richard Avatar answered Sep 20 '22 04:09

Richard