Boost logo

Boost-Build :

Subject: Re: [Boost-build] Very slow Visual Studio 2012 builds
From: Juraj Ivanèiæ (juraj.ivancic_at_[hidden])
Date: 2013-11-05 08:52:17


On 5.11.2013. 3:12, Steven Watanabe wrote:

> Is there anything besides environmental
> variables that can be set by batch scripts
> and which can affect subprocesses? I can't
> think of anything off the top of my head,
> but I'm hesitant to rule it out entirely.

One can tamper with disk files.

I say we commit new behavior and wait for a complaint.
It would be very interesting to see what we broke.

>> I am not sure how to make this 'batch file caching' work on
>> cygwin though. AFAICS it boils down to generating a
>> simpler (faster) batch file, like Chris is doing. I don't
>> think its worth the hassle. Not to me, anyway.
>>
>
> There's no reason that the variables have
> to be set up using batch file syntax.
> You could split each line at the '=' and
> use common.variable-setting-command.

I tried that now - turns out that is only a part of the problem.
Environment variables come from cmd.exe as setup
scripts are batch files. Consequently PATH contains windows
paths, and sh.exe is unable to do PATH lookup. This can be worked
around by converting PATH to cygwin paths, but that seems ugly and
wrong. And there might be other pitfalls I don't see.

>> How about just leaving cygwin to work as it did, and speed up
>> msvc?
>
> That works, too. I don't care as long as
> it isn't broken.

Attached patch works with both.

I also did a little benchmark to see the effects:

Building boost 1.54 with latest boost build.

Command: bjam stage --stagedir=. -a -j 4 toolset=***

+-----------+----------+----------+
| *** | old impl | new impl |
+-----------+----------+----------+
| msvc-9.0 | 12:16.76 | 10:37.85 |
+-----------+----------+----------+
| msvc-10.0 | 18:03.09 | 11:28.68 |
+-----------+----------+----------+
| msvc-11.0 | 19:27.08 | 11:34.44 |
+-----------+----------+----------+

The effects are visible even with 9.0, and, as expected,
very significant with 10.0+.




Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk