Re: SCons very slow on GitHub actions

Leonard de Ruijter <[email protected]> Mon, 28 Apr 2025 21:30:04 +0200
Newsgroups gmane.comp.programming.tools.scons.user
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--===============6969986193885317340==
Content-Type: multipart/alternative;
 boundary="------------12s0KnACUL8EjukmOjaNqIQS"
Content-Language: nl, en-US

This is a multi-part message in MIME format.
--------------12s0KnACUL8EjukmOjaNqIQS
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

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 AM Bill Deegan 
> <[email protected]> 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=[])
>
>     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 AM 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 list
> [email protected]
> https://pairlist4.pair.net/mailman/listinfo/scons-users
--------------12s0KnACUL8EjukmOjaNqIQS
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hello Bill,</p>
    <p><br>
    </p>
    <p>I'm using this as an example of the real issue.</p>
    <p>For NVDA (<a class="moz-txt-link-freetext"
        href="https://github.com/nvaccess/nvda/" moz-do-not-send="true">https://github.com/nvaccess/nvda/</a>),
      which is a bigger project, the reading script files phase takes
      more than two minutes.</p>
    <p>There's also osara: <a class="moz-txt-link-freetext"
        href="https://github.com/jcsteh/osara/pull/1235"
        moz-do-not-send="true">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 class="moz-cite-prefix">On 4/28/2025 8:31 PM, Bill Deegan
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAEyG4CEw5dKK+iA1uvgHh6etMaNcG_33yMjs4FWKYxiPY76FWQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="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="gmail_quote gmail_quote_container">
        <div dir="ltr" class="gmail_attr">On Mon, Apr 28, 2025 at
          8:30 AM Bill Deegan &lt;<a
            href="mailto:[email protected]"
            moz-do-not-send="true" class="moz-txt-link-freetext">[email protected]</a>&gt;
          wrote:<br>
        </div>
        <blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div dir="ltr">
            <div>Curious. Have you tried to compare the runtimes of each
              of the examples?</div>
            <div>I wouldn'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're not using it.<br>
              DefaultEnvironment(tools=[])</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's SCons basically we're not going
              to use it, so don't initialize it.</div>
            <div><br>
            </div>
            <div>There'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>
                  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't an issue for a simple build.</div>
            <div>(especially if they're not on windows)</div>
            <div><br>
            </div>
            <div>I just made a PR with these changes.</div>
            <div><a
                href="https://github.com/SCons/scons-examples/pull/8"
                target="_blank" moz-do-not-send="true"
                class="moz-txt-link-freetext">https://github.com/SCons/scons-examples/pull/8</a></div>
            <div><br>
            </div>
            <div>I'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="gmail_quote">
            <div dir="ltr" class="gmail_attr">On Mon, Apr 28, 2025 at
              5:57 AM Mats Wichmann &lt;<a
                href="mailto:[email protected]" target="_blank"
                moz-do-not-send="true" class="moz-txt-link-freetext">[email protected]</a>&gt;
              wrote:<br>
            </div>
            <blockquote class="gmail_quote"
style="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="https://github.com/LeonarddeR/scons-"
                rel="noreferrer" target="_blank" moz-do-not-send="true"
                class="moz-txt-link-freetext">https://github.com/LeonarddeR/scons-</a>
              <br>
              &gt; examples/actions/runs/14706591575<br>
              &gt; <br>
              &gt; This uses the workflow file found in <a
                href="https://github.com/SCons/scons-" rel="noreferrer"
                target="_blank" moz-do-not-send="true"
                class="moz-txt-link-freetext">https://github.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.  I've seen that tag attribute
              error before... <br>
              suppose I should go poke at those again someday.<br>
              _______________________________________________<br>
              Scons-users mailing list<br>
              <a href="mailto:[email protected]" target="_blank"
                moz-do-not-send="true" class="moz-txt-link-freetext">[email protected]</a><br>
              <a
href="https://pairlist4.pair.net/mailman/listinfo/scons-users"
                rel="noreferrer" target="_blank" moz-do-not-send="true"
                class="moz-txt-link-freetext">https://pairlist4.pair.net/mailman/listinfo/scons-users</a><br>
            </blockquote>
          </div>
        </blockquote>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre wrap="" class="moz-quote-pre">_______________________________________________
Scons-users mailing list
<a class="moz-txt-link-abbreviated moz-txt-link-freetext"
      href="mailto:[email protected]" moz-do-not-send="true">[email protected]</a>
<a class="moz-txt-link-freetext"
      href="https://pairlist4.pair.net/mailman/listinfo/scons-users"
      moz-do-not-send="true">https://pairlist4.pair.net/mailman/listinfo/scons-users</a>
</pre>
    </blockquote>
  </body>
</html>

--------------12s0KnACUL8EjukmOjaNqIQS--

--===============6969986193885317340==
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

--===============6969986193885317340==--