Re: Improve speed of windows environment

Pierre-Luc Boily <[email protected]>
Newsgroups gmane.comp.programming.tools.scons.user
Message-ID <CACTRa=v9R6Z-0buGu0XNbF6MeeeqNN5rgfvEh3ZpUzoBW_Wn3g@mail.gmail.com>
Le mar. 23 avr. 2019, à 16 h 44, Bill Deegan <[email protected]> a
écrit :

> The tool isn't Object, but what type of tool creates an object.
> Note my email said
> env=Environment(tools=[only the tools you're using],...)
> not
> env=Environment(tools=[],)
>

I know, I just wanted to do some test for my own comprehension =)


> Also why are you using: SCons.Environment.Environment  instead of
> Environment() ?
>

Is it incorrect?   My SConstruct looks like this :
https://pastebin.com/SwB7GkGT.  He is really neat and clean.  All the logic
is in SConscriptManager and if I try to use only Environment call (without
the SCons.Environment) scons is complaining that he doesn't know about
Environment (NameError: name 'Environment' is not defined)


> In your case it looks like you need all of MSVC (at least) so:
> sconsEnv = Environment(MSVC_VERSION = '10.0', TARGET_ARCH = 'x86',
> tools=['msvc','mslink','mslib'])
>

Ok thx,this works, but unfortunately, I have absolutely no performance
gain.  Just as a matter of test, if I use   Environment(MSVC_VERSION =
'10.0', TARGET_ARCH = 'x86', tools=[]), I can clearly see an improvement.
It takes around 600ms to create the environment.  But soon as I add only 1
tool, it goes back to 1500ms.  It looks like it doesn't make any difference
having 1 or 15 tools.. weird...

Well, I guess I have to live with windows drawback to being bad with
starting process!!  I recently did a huge change in our scons
implementation to load only needed sconscript.  For same code base, I went
from :
SConstruct  took 16660.409 ms
to this
SConstruct  took 1500 ms

Which is already an awesome improvement.... But you know, more you have,
more you want =)



>
> Give that a try.
> -Bill
>
> On Tue, Apr 23, 2019 at 1:48 PM Pierre-Luc Boily <
> [email protected]> wrote:
>
>> Ok, I tried  your solution but scons complains that Object doesn't exist,
>> (which is normal I know).  2 Stupids questions:
>>
>> 1- What is the difference between tools and builders in the environment?
>> By doing this :
>> DefaultEnvironment(tools=[])
>> env=Environment(tools=[],...)
>>
>> both tools and builders are now empty.
>>
>> 2- I need env.Object, env.Library env.Program, but those are gone from
>> the BUILDERS section.  How to I add them when I create the Environment?
>> Tried this, but that doesn't work :
>> sconsEnv = SCons.Environment.Environment(MSVC_VERSION = '10.0',
>> TARGET_ARCH = 'x86', tools=['Object'])
>>
>> Thank you very much!
>>
>> Pierre-Luc
>>
>>
>> Le mar. 23 avr. 2019, à 10 h 54, Bill Deegan <[email protected]>
>> a écrit :
>>
>>> Yes.
>>> This has long been the case.
>>> Launching processes in Windows is MUCH slower than linux.
>>> When SCons starts up it tries to load all the default tools.
>>> This involves launching numerous processes to see what tools are
>>> available and also which version(s)
>>> You can speed this up by only loading the tools you're using on windows.
>>>
>>> Do you only use env.Program() or do you also use Program() (which uses
>>> the DefaultEnvironment())
>>> So:
>>> DefaultEnvironment(tools=[])
>>> env=Environment(tools=[only the tools you're using],...)
>>>
>>> Should help.
>>>
>>> -Bill
>>>
>>>
>>>
>>> On Tue, Apr 23, 2019 at 10:07 AM Pierre-Luc Boily <
>>> [email protected]> wrote:
>>>
>>>> Hello!
>>>>
>>>> I just realized that the creation of an environment is faster under
>>>> centos
>>>> compared to windows 10.  See below Dump trace with --deubg=time
>>>> arguments :
>>>>
>>>> Centos : https://pastebin.com/UPggyDcj
>>>> Windows : https://pastebin.com/11YzKNDH
>>>>
>>>> I already read somewhere that tool creation is time consuming, but both
>>>> centos\windows environments looks similar to be regarding tools..  So, I
>>>> don't know why windows takes 1500 ms compare to 300ms for centos.
>>>>
>>>> Any idea?
>>>>
>>>> thx!
>>>>
>>>>
>>>>
>>>> --
>>>> Sent from: http://scons.1086193.n5.nabble.com/Users-f16930.html
>>>> _______________________________________________
>>>> Scons-users mailing list
>>>> [email protected]
>>>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>>>
>>> _______________________________________________
>>> Scons-users mailing list
>>> [email protected]
>>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>>
>> _______________________________________________
>> Scons-users mailing list
>> [email protected]
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>
> _______________________________________________
> Scons-users mailing list
> [email protected]
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>

_______________________________________________
Scons-users mailing list
[email protected]
https://pairlist4.pair.net/mailman/listinfo/scons-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.