Compiling under dualcore systems  
Author Message
RoobyDoo





PostPosted: Visual C# IDE, Compiling under dualcore systems Top

Is it possible to get Visual Studio to use the full capabilities of multiple processors and/or dualcore processors

I have a project in Visual Studio that takes 4 - 5 minutes to compile, and during the entire time, it's only using 50% of the available processor power.

Obviously it's going to take time for the compiler to be upgraded to support multiple cores and multiple processors, but is it possible to at least compile two files at the same time - a copy of the compiler running on each core/processor

One of the projects in question is a Visual C++ project with just over a hundred cpp files. The machine used to compile the project is a AMD X2 4800 with 2GB of RAM.


Visual C#4  
 
 
Paul Harrington MSFT





PostPosted: Visual C# IDE, Compiling under dualcore systems Top

Only Visual C++ can do multiprocessor builds, but it really only works for building multiple projects simultaneously. It might not be able to compile your project if all those files are dependent on each other.

There are some good tips for speeding up your C++ builds in the online help: Search for "How Can I Build Faster "

Make sure you are making "smart" use of precompiled headers. If you have a lot of headers that are commonly included, then put them in your PCH. Sometimes, splitting the project up into smaller libraries (static LIBs) can help - especially if there are files that are naturally grouped together that can share their own PCH. If you do that, you will probably also be able to take advantage of multiprocessor builds (because each .lib can be built in a separate process)

Hope that helps.