[Scons-users] Help my build get faster... (was SCons and parts)

Pico Geyer picogeyer at gmail.com
Wed Aug 16 06:16:38 EDT 2017


Jason,
Thanks again for the feedback. My comments inline.

On Wed, Aug 16, 2017 at 12:11 AM, Jason Kenny <dragon512 at live.com> wrote:
> In parts I tend to make lots of Clones, However this is limited to having an environment per component, as normally these need an environment that is not shared because of various flags, defines, libs that cannot be shared. Not fulling understanding what you are doing... a Clone for each object ( as in a object file) seem excessive.

Yes, it is a bit excessive but unfortunately that's the requirement I
have to work with for this particular project.
It's not really an object file per se, but in order to avoid having to
explain the intricacies of our project, I used object file as an
example.
Visual studio does for example let you override flags per source file,
so although it might not be common, it should be possible

> I think the worse I had seen it with work I have done was a product with about 1200 "Parts"  which meant I had over 2000 clones myself, loading everything first pass took 60+ seconds ( mostly because of large disk scan). Not cloning, but creating new environments meant the time to load everything went to 10+ minutes. Ideally having a lighter Clone would be ideal, and can be done.

I would love to hear suggestions. I'm not sure if I'll have the time
(or skill) to implement this myself but I'd at least like to take a
look.

> I have not gone the extra mile for this in Parts as of yet. Ideally building each DLL/SO/EXE/program will want to have a Cloned Environment, If you have a test setup this might want to have a clone as well. only in very advance cases do you need something per object file, and mos
>  t of the time these can be done correctly in a shared environment. The value you get out of part if you use it here is that on the second pass I can load less stuff based on what is out of date, as I know what builds what. This mean loading less and a smaller node tree in SCons. However if you change a file in the leaf component everything else needs, at the moment I am forced to load everything that depends on that leaf.

This sounds like exactly what I want.
So let me rephrase to make sure I'm understanding correctly.
Lets say I'm using parts and I have the massive subproject in a
Sconscript file and lets say I'm not actually interested in building
the big sub-project right now.
The first time I run scons, I'd imagine that it has to build the full
dependency tree which takes some time.
However if I now want to build a simple helloworld that has no
dependency on the large project. Would parts know that helloworld does
not depend on the large project and therefore avoid having to build
the tree all over again (and by extension avoid the thousands of
env.Clones()) ?

If I understand your last sentence correctly, if I further change
helloworld.c, the tree for the large component would still not need to
be rebuilt, only the subtree for helloworld?


More information about the Scons-users mailing list