[Scons-dev] SCons-like build system

Dirk Bächle tshortik at gmx.de
Tue Feb 3 03:21:12 EST 2015


Vasily,

On 02.02.2015 14:44, Vasily wrote:
> Hi Dirk,
>
> Do you have any methods on how do one finds those places to improve subst() performance?

all I've ever done is to profile SCons with cProfile, and then looked at the output.

> I mean, how can I understand which subst's are used, and which of those could benefit from simplifying most (like FastCPP tool does
> with suffixes)?

There is no silver bullet here. In the case of these C++ benchmarks it's clear that the CXXCOM action gets used over and over again, 
so it's a low hanging fruit for optimization. But as you see, I didn't pre-expand the linker command...it gets called only 200 times 
for the whole build, so it's not worth the effort.

In general, one also has to take into account the fact that these benchmarks use very rudimentary C++ files/headers. The compile 
time per file is kept small, which means that timing the full build is measuring the "overhead" that the used build system adds to 
the actual compile/link time.
As soon as your sources get larger and more complicated, the impact of the mentioned optimizations will get less visible.
They reduce the overhead, but that doesn't automatically result in a 20% faster build every time. ;)

Best regards,

Dirk



More information about the Scons-dev mailing list