[Scons-dev] Optimizing SCons...

Dirk Bächle tshortik at gmx.de
Sun Dec 2 12:56:02 EST 2012


Hi Gary,

On 02.12.2012 17:58, Gary Oberbrunner wrote:

> This looks very interesting. Speed and memory use are two "hot

> button" issues for many SCons users.

>

> What does it do that would break existing projects? Is it the not

> storing of full paths? (When were slots introduced? 2.2? In that

> case we're fine on that front.)

>


all the path attributes for File nodes ("abspath", "labspath" ...) have
now to be retrieved via functions like "get_abspath()", because they
might get computed on the fly.
They usually get accessed directly in old code...and this is also the
recommended method in all the documents.

This change is the last in line, so it can be easily omitted for a
start...it brings just a few percent anyway.

Regarding the usage of slots we have to keep the following in mind: it
makes extending SCons a little bit more difficult. You can't simply slap
new attributes and functions on a class like SCons.Node anymore, but
have to subclass it instead.
Multiple inheritance is not possible anymore for the "slotted"
classes...so we'd lose some flexibility for SCons as a build system
framework.

Regards,

Dirk



More information about the Scons-dev mailing list