Boost logo

Boost-Build :

Subject: [Boost-build] Very slow Visual Studio 2012 builds
From: Nogradi, Chris (Chris.Nogradi_at_[hidden])
Date: 2013-09-27 10:30:36


We have been investigating switching from using Visual Studio 2005 to Visual Studio 2012 for our development using The issue we are seeing is that a build that normally takes 2 minutes with VS 2005, now takes twice as long with VS 2012. I did some investigation and discovered that the issue is with bb2's per compiler/linker action usage of vcvarsall.bat. In VS 2005, this batch file only sets up variables and paths. In VS 2012, the same thing is done but there are windows registry queries that apparently are very time consuming and result in adding 2 additional minutes to the overall build. I plan to attempt to address this problem but wanted some advice from experts to ensure that I approach it the right way. Here are the solutions I have thought of so far:

* THIS IS A HACK: Wrap the bjam command in a batch file which calls vcvarsall.bat 1st and then calls bjam. Also initialize the msvc toolset using <setup>echo to cause it to not call the vcvarsall.bat during every compiler/linker invocation or auto detect that the environment variables are already setup and so there is no need to invoke the batch script for every compiler/linker action. This will not work if bjam is invoked with multiple msvc versions so I would rather not do this.

* During the msvc initialization, somehow capture the work performed by vcvarsall.bat, cache it to another batch file and execute this one for every compiler/linker action. Echo is off when executing this batch file and I can't find any way to override this so that the commands can be replayed later.

* Figure out which env variables are really needed and provided by vcvarsall.bat and make msvc.jam set them up for every compiler/linker invocation instead of running the batch file.

Your help on addressing this issue is much appreciated.




CONFIDENTIALITY NOTICE: This email and any attachments are for the sole use of the intended recipient(s) and contain information that may be confidential and/or legally privileged. If you have received this email in error, please notify the sender by reply email and delete the message. Any disclosure, copying, distribution or use of this communication (including attachments) by someone other than the intended recipient is prohibited. Thank you.

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at