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

Jason Kenny dragon512 at live.com
Wed Aug 16 17:50:40 EDT 2017


Bill

I should point out this does the light clone I talk about. It generates an OverrideEnvironment.

I think this logic defeats the purpose of Environment. The point of the Environment is to hold state for a given set of actions. It is a lot easier to set it once vs having to assign the value over and over again for each builder.

The only point I see for makng a new environment is to define a toolchain. The point of cloning a environment is to replace, extend existing values for a set of builder calls

Jason



From: Scons-users [mailto:scons-users-bounces at scons.org] On Behalf Of Bill Deegan
Sent: Tuesday, August 15, 2017 9:57 PM
To: SCons users mailing list <scons-users at scons.org>
Subject: Re: [Scons-users] Help my build get faster... (was SCons and parts)

Pico,
You can do this.
env.MyBuilder(Target,Source, ANY_ENV_FLAG=['a','b','c'], CPPPATH=['z','d','f']
There's no need to clone the environment to have specialized flags for a given builder or target..

On Tue, Aug 15, 2017 at 12:09 PM, Pico Geyer <picogeyer at gmail.com<mailto:picogeyer at gmail.com>> wrote:
It's actually our own builder that we are using in this case, each
object could have different include paths or options.
But just like if you had a list of C files to build each with their
own include paths, wouldn't you need to create a new environment for
each?

On Tue, Aug 15, 2017 at 5:51 PM, Bill Deegan <bill at baddogconsulting.com<mailto:bill at baddogconsulting.com>> wrote:
> Why do you need a new Environment for each object?
> Can you paste some code to explain?
>
>
> On Tue, Aug 15, 2017 at 11:34 AM, Pico Geyer <picogeyer at gmail.com<mailto:picogeyer at gmail.com>> wrote:
>>
>> Bill,
>> Sorry for the delay.
>>
>> Right of course. I was just hoping for something in scons due to the
>> number of SConscript files that I have (and laziness :) )
>> So indeed it was the file I suspected.
>> I seemed to have further narrowed it down to env.Clone(), since I need
>> a new environment for each object. And their are roughly 2000 of them.
>> This seems to take about 4 seconds.
>> I found this with the combination of print messages (like your
>> example) and the very useful  line_profiler tool
>> (https://github.com/rkern/line_profiler)
>> I could send you the output off list if you're interested.
>>
>> Any suggestion on what I can do to improve things?
>> If there isn't a way to make it faster, I was hoping for a way to
>> detect early on that I'm not building that component anyway, so I
>> don't need to process those objects (and therefore do so many
>> environment clones).
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org<mailto:Scons-users at scons.org>
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org<mailto:Scons-users at scons.org>
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
_______________________________________________
Scons-users mailing list
Scons-users at scons.org<mailto:Scons-users at scons.org>
https://pairlist4.pair.net/mailman/listinfo/scons-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20170816/5d6c90b0/attachment.html>


More information about the Scons-users mailing list