Re: SCons very slow on GitHub actions

Bill Deegan <[email protected]> Mon, 28 Apr 2025 10:05:54 -1000
Newsgroups gmane.comp.programming.tools.scons.user
Message-ID <CAEyG4CFhAV_grMbL=E8N1CFHjfKZsR4sQ2=as=jUMPMM+0-jvA@mail.gmail.com>
--===============0957170904917794567==
Content-Type: multipart/alternative; boundary="000000000000d9ac5e0633dc3689"

--000000000000d9ac5e0633dc3689
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

What have you tried thus far?

Have you run with : --debug=3Dtime ?
I'm on vacation at the moment, so don't have a bunch of time or resources
to take a look at this until later in the week.

Is this a commercial project? or open source and free?

How complicated is setting up a win11 machine to do your build?

Any reason to limit yourself to python 3.11?
There have been gains in performance with 3.12 and 3.13 as far as I know.
Might be worth moving forward if you can?

-Bill

On Mon, Apr 28, 2025 at 9:31=E2=80=AFAM Leonard de Ruijter <alderuijter@gma=
il.com>
wrote:

> Hello Bill,
>
>
> I'm using this as an example of the real issue.
>
> For NVDA (https://github.com/nvaccess/nvda/), which is a bigger project,
> the reading script files phase takes more than two minutes.
>
> There's also osara: https://github.com/jcsteh/osara/pull/1235
>
> In the linked pull request, I performed some tests to improve build times=
,
> with no avail yet. I will try the environment variable as suggested.
>
>
> Regards,
>
>
> Leonard
> On 4/28/2025 8:31 PM, Bill Deegan wrote:
>
> Is the scons-examples repo your actual issue?
> Or are you just using this as an example of your real issue?
> If so, please explain.
>
> On Mon, Apr 28, 2025 at 8:30=E2=80=AFAM Bill Deegan <bill@baddogconsultin=
g.com>
> wrote:
>
>> Curious. Have you tried to compare the runtimes of each of the examples?
>> I wouldn't be surprised if one of the examples shows a much larger
>> difference in runtime than the others
>>
>> Ok. I took a look.
>> Chances are the tests which are missing:
>>
>> # Skip initializing any tools in the DefaultEnvironment
>> # as we're not using it.
>> DefaultEnvironment(tools=3D[])
>>
>> Are the ones taking much longer on Windows.
>> This is because when SCons starts up it initializes the
>> DefaultEnvironment(), in particular MSVC initialization is low.
>> The above code tell's SCons basically we're not going to use it, so don'=
t
>> initialize it.
>>
>> There's also some logic to cache the MSVC initialization which could be
>> turned on.
>>
>> Add this to your github actions .yml file:
>> env:
>>     SCONS_CACHE_MSVC_CONFIG: 1
>>
>> In general the scons-examples are meant to be simple examples of
>> different SCons usage.
>> Not the most optimized for build time, as for some users this isn't an
>> issue for a simple build.
>> (especially if they're not on windows)
>>
>> I just made a PR with these changes.
>> https://github.com/SCons/scons-examples/pull/8
>>
>> I'll merge them, and then you can rebase/merge into your PR and let us
>> know if that improves things.
>>
>>
>> -Bill
>>
>> On Mon, Apr 28, 2025 at 5:57=E2=80=AFAM Mats Wichmann <[email protected]>=
 wrote:
>>
>>> On 4/28/25 07:42, Leonard de Ruijter wrote:
>>> > Dear Mats,
>>> >
>>> >
>>> > Thanks for your quick reply.
>>> >
>>> > You can find comparison times in https://github.com/LeonarddeR/scons-
>>> > examples/actions/runs/14706591575
>>> >
>>> > This uses the workflow file found in https://github.com/SCons/scons-
>>> > examples/pull/7
>>>
>>> as an aside, I see several of the packaging examples are broken. We
>>> moved most of these out of the manpage a while back to better align
>>> where things were done.  I've seen that tag attribute error before...
>>> suppose I should go poke at those again someday.
>>> _______________________________________________
>>> Scons-users mailing list
>>> [email protected]
>>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>>
>>
> _______________________________________________
> Scons-users mailing [email protected]://pairlist4.pair.net/m=
ailman/listinfo/scons-users
>
> _______________________________________________
> Scons-users mailing list
> [email protected]
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>

--000000000000d9ac5e0633dc3689
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>What have you tried thus far?</div><div><br></div><di=
v>Have you run with : --debug=3Dtime ?</div><div>I&#39;m on vacation at the=
 moment, so don&#39;t have a bunch of time or resources to take a look at t=
his until later in the week.</div><div><br></div><div>Is this a commercial =
project? or open source and free?</div><div><br></div><div>How complicated =
is setting up a win11 machine to do your build?</div><div><br></div><div>An=
y reason to limit yourself to python 3.11? <br></div><div>There have been g=
ains in performance with 3.12 and 3.13 as far as I know.</div><div>Might be=
 worth moving forward if you can?</div><div><br></div><div>-Bill</div></div=
><br><div class=3D"gmail_quote gmail_quote_container"><div dir=3D"ltr" clas=
s=3D"gmail_attr">On Mon, Apr 28, 2025 at 9:31=E2=80=AFAM Leonard de Ruijter=
 &lt;<a href=3D"mailto:[email protected]">[email protected]</a>&gt;=
 wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px =
0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>

 =20
   =20
 =20
  <div>
    <p>Hello Bill,</p>
    <p><br>
    </p>
    <p>I&#39;m using this as an example of the real issue.</p>
    <p>For NVDA (<a href=3D"https://github.com/nvaccess/nvda/" target=3D"_b=
lank">https://github.com/nvaccess/nvda/</a>),
      which is a bigger project, the reading script files phase takes
      more than two minutes.</p>
    <p>There&#39;s also osara: <a href=3D"https://github.com/jcsteh/osara/p=
ull/1235" target=3D"_blank">https://github.com/jcsteh/osara/pull/1235</a></=
p>
    <p>In the linked pull request, I performed some tests to improve
      build times, with no avail yet. I will try the environment
      variable as suggested.</p>
    <p><br>
    </p>
    <p>Regards,</p>
    <p><br>
    </p>
    <p>Leonard</p>
    <div>On 4/28/2025 8:31 PM, Bill Deegan
      wrote:<br>
    </div>
    <blockquote type=3D"cite">
     =20
      <div dir=3D"ltr">
        <div>Is the scons-examples repo your actual issue?</div>
        <div>Or are you just using this as an example of your real
          issue?</div>
        <div>If so, please explain.</div>
      </div>
      <br>
      <div class=3D"gmail_quote">
        <div dir=3D"ltr" class=3D"gmail_attr">On Mon, Apr 28, 2025 at
          8:30=E2=80=AFAM Bill Deegan &lt;<a href=3D"mailto:bill@baddogcons=
ulting.com" target=3D"_blank">[email protected]</a>&gt;
          wrote:<br>
        </div>
        <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex=
;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div dir=3D"ltr">
            <div>Curious. Have you tried to compare the runtimes of each
              of the examples?</div>
            <div>I wouldn&#39;t be surprised if one of the examples shows a
              much larger difference in runtime than the others</div>
            <div><br>
            </div>
            <div>Ok. I took a look.</div>
            <div>Chances are the tests which are missing:</div>
            <div><br>
            </div>
            <div># Skip initializing any tools in the DefaultEnvironment
              <br>
              # as we&#39;re not using it.<br>
              DefaultEnvironment(tools=3D[])</div>
            <div><br>
            </div>
            <div>Are the ones taking much longer on Windows.</div>
            <div>This is because when SCons starts up it initializes the
              DefaultEnvironment(), in particular MSVC initialization is
              low.</div>
            <div>The above code tell&#39;s SCons basically we&#39;re not go=
ing
              to use it, so don&#39;t initialize it.</div>
            <div><br>
            </div>
            <div>There&#39;s also some logic to cache the MSVC
              initialization which could be turned on.</div>
            <div><br>
            </div>
            <div>Add this to your github actions .yml file:</div>
            <div>env:<br>
              =C2=A0 =C2=A0 SCONS_CACHE_MSVC_CONFIG: 1</div>
            <div><br>
            </div>
            <div>In general the scons-examples are meant to be simple
              examples of different SCons usage.</div>
            <div>Not the most optimized for build time, as for some
              users this isn&#39;t an issue for a simple build.</div>
            <div>(especially if they&#39;re not on windows)</div>
            <div><br>
            </div>
            <div>I just made a PR with these changes.</div>
            <div><a href=3D"https://github.com/SCons/scons-examples/pull/8"=
 target=3D"_blank">https://github.com/SCons/scons-examples/pull/8</a></div>
            <div><br>
            </div>
            <div>I&#39;ll merge them, and then you can rebase/merge into
              your PR and let us know if that improves things.</div>
            <div><br>
            </div>
            <div><br>
            </div>
            <div>-Bill <br>
            </div>
          </div>
          <br>
          <div class=3D"gmail_quote">
            <div dir=3D"ltr" class=3D"gmail_attr">On Mon, Apr 28, 2025 at
              5:57=E2=80=AFAM Mats Wichmann &lt;<a href=3D"mailto:mats@wich=
mann.us" target=3D"_blank">[email protected]</a>&gt;
              wrote:<br>
            </div>
            <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0=
.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On
              4/28/25 07:42, Leonard de Ruijter wrote:<br>
              &gt; Dear Mats,<br>
              &gt; <br>
              &gt; <br>
              &gt; Thanks for your quick reply.<br>
              &gt; <br>
              &gt; You can find comparison times in <a href=3D"https://gith=
ub.com/LeonarddeR/scons-" rel=3D"noreferrer" target=3D"_blank">https://gith=
ub.com/LeonarddeR/scons-</a>
              <br>
              &gt; examples/actions/runs/14706591575<br>
              &gt; <br>
              &gt; This uses the workflow file found in <a href=3D"https://=
github.com/SCons/scons-" rel=3D"noreferrer" target=3D"_blank">https://githu=
b.com/SCons/scons-</a>
              <br>
              &gt; examples/pull/7<br>
              <br>
              as an aside, I see several of the packaging examples are
              broken. We <br>
              moved most of these out of the manpage a while back to
              better align <br>
              where things were done.=C2=A0 I&#39;ve seen that tag attribut=
e
              error before... <br>
              suppose I should go poke at those again someday.<br>
              _______________________________________________<br>
              Scons-users mailing list<br>
              <a href=3D"mailto:[email protected]" target=3D"_blank">Sc=
[email protected]</a><br>
              <a href=3D"https://pairlist4.pair.net/mailman/listinfo/scons-=
users" rel=3D"noreferrer" target=3D"_blank">https://pairlist4.pair.net/mail=
man/listinfo/scons-users</a><br>
            </blockquote>
          </div>
        </blockquote>
      </div>
      <br>
      <fieldset></fieldset>
      <pre>_______________________________________________
Scons-users mailing list
<a href=3D"mailto:[email protected]" target=3D"_blank">Scons-users@scon=
s.org</a>
<a href=3D"https://pairlist4.pair.net/mailman/listinfo/scons-users" target=
=3D"_blank">https://pairlist4.pair.net/mailman/listinfo/scons-users</a>
</pre>
    </blockquote>
  </div>

_______________________________________________<br>
Scons-users mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank">Scons-users@scon=
s.org</a><br>
<a href=3D"https://pairlist4.pair.net/mailman/listinfo/scons-users" rel=3D"=
noreferrer" target=3D"_blank">https://pairlist4.pair.net/mailman/listinfo/s=
cons-users</a><br>
</blockquote></div>

--000000000000d9ac5e0633dc3689--

--===============0957170904917794567==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Scons-users mailing list
[email protected]
https://pairlist4.pair.net/mailman/listinfo/scons-users

--===============0957170904917794567==--