Re: SCons very slow on GitHub actions
Bill Deegan <[email protected]> Mon, 28 Apr 2025 08:31:38 -1000
| Newsgroups | gmane.comp.programming.tools.scons.user |
|---|---|
| Message-ID | <CAEyG4CEw5dKK+iA1uvgHh6etMaNcG_33yMjs4FWKYxiPY76FWQ@mail.gmail.com> |
--===============7906655715594741075== Content-Type: multipart/alternative; boundary="000000000000c83d9d0633dae5f0" --000000000000c83d9d0633dae5f0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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@baddogconsulting.= 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 differen= t > 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 >> > --000000000000c83d9d0633dae5f0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>Is the scons-examples repo your actual issue?</div><d= iv>Or are you just using this as an example of your real issue?</div><div>I= f so, please explain.</div></div><br><div class=3D"gmail_quote gmail_quote_= container"><div dir=3D"ltr" class=3D"gmail_attr">On Mon, Apr 28, 2025 at 8:= 30=E2=80=AFAM Bill Deegan <<a href=3D"mailto:[email protected]">= [email protected]</a>> wrote:<br></div><blockquote class=3D"gmai= l_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,20= 4,204);padding-left:1ex"><div dir=3D"ltr"><div>Curious. Have you tried to c= ompare the runtimes of each of the examples?</div><div>I wouldn't be su= rprised if one of the examples shows a much larger difference in runtime th= an 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 initializ= ing any tools in the DefaultEnvironment <br># as we're not using it.<br= >DefaultEnvironment(tools=3D[])</div><div><br></div><div>Are the ones takin= g 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 goi= ng to use it, so don't initialize it.</div><div><br></div><div>There= 9;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:</di= v><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 diff= erent 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>(especiall= y if they'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-exa= mples/pull/8" target=3D"_blank">https://github.com/SCons/scons-examples/pul= l/8</a></div><div><br></div><div>I'll merge them, and then you can reba= se/merge into your PR and let us know if that improves things.</div><div><b= r></div><div><br></div><div>-Bill <br></div></div><br><div class=3D"gmail_q= uote"><div dir=3D"ltr" class=3D"gmail_attr">On Mon, Apr 28, 2025 at 5:57=E2= =80=AFAM Mats Wichmann <<a href=3D"mailto:[email protected]" target=3D"_b= lank">[email protected]</a>> wrote:<br></div><blockquote class=3D"gmail_q= uote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,2= 04);padding-left:1ex">On 4/28/25 07:42, Leonard de Ruijter wrote:<br> > Dear Mats,<br> > <br> > <br> > Thanks for your quick reply.<br> > <br> > You can find comparison times in <a href=3D"https://github.com/Leonard= deR/scons-" rel=3D"noreferrer" target=3D"_blank">https://github.com/Leonard= deR/scons-</a> <br> > examples/actions/runs/14706591575<br> > <br> > This uses the workflow file found in <a href=3D"https://github.com/SCo= ns/scons-" rel=3D"noreferrer" target=3D"_blank">https://github.com/SCons/sc= ons-</a> <br> > 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'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=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> </blockquote></div> --000000000000c83d9d0633dae5f0-- --===============7906655715594741075== 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 --===============7906655715594741075==--