Speeding up builds
"Davis C." <[email protected]> Thu, 22 May 2025 11:43:35 -0500
| Newsgroups | gmane.comp.programming.swig |
|---|---|
| Message-ID | <CALD9z9GtvfXZCcEDz6h_6mLLiBbWhCXbdRE48sNpRZHM+quVtw@mail.gmail.com> |
--===============3080958877566270145== Content-Type: multipart/alternative; boundary="0000000000006fc2b80635bc2f91" --0000000000006fc2b80635bc2f91 Content-Type: text/plain; charset="UTF-8" Hello! I'm new to SWIG, but am looking to integrate it into a project of mine. It mostly seems to work flawlessly so far, but on a very large file (a 140k line header file), SWIG takes a very long time to generate the python wrapper (22 minutes on my system) [1]. This header file is mostly struct and enum declarations. Is there any way to speed up the build, or make it multithreaded? Running `htop` while its building shows that it's only using a single core. I've tried some of the CLI flags like `-no<blah>`, but they didn't seem to provide much of a speed up. I imagine breaking the file up some would help, but I don't control the file and would prefer to avoid manually splitting it. [1]: The specific command I'm using is `swig -python -doxygen -module thing thing.h`. I'd like the doxygen output, but even without the flag, it's still quite slow. Thanks, Davis --0000000000006fc2b80635bc2f91 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"auto"><div>Hello! I'm new to SWIG, but am looking to integr= ate it into a project of mine.=C2=A0</div><div dir=3D"auto"><br></div><div = dir=3D"auto">It mostly seems to work flawlessly so far, but on a very large= file (a 140k line header file), SWIG takes a very long time to generate th= e python wrapper (22 minutes on my system) [1]. This header file is mostly = struct and enum declarations.=C2=A0</div><div dir=3D"auto"><br></div><div d= ir=3D"auto">Is there any way to speed up the build, or make it multithreade= d? Running `htop` while its building shows that it's only using a singl= e core. I've tried some of the CLI flags like `-no<blah>`, but th= ey didn't seem to provide much of a speed up. I imagine breaking the fi= le up some would help, but I don't control the file and would prefer to= avoid manually splitting it.=C2=A0</div><div dir=3D"auto"><br></div><div d= ir=3D"auto">[1]: The specific command I'm using is `swig -python -doxyg= en -module thing thing.h`. I'd like the doxygen output, but even withou= t the flag, it's still quite slow.=C2=A0</div><div><br></div><div data-= smartmail=3D"gmail_signature"><div dir=3D"ltr">Thanks,</div><div dir=3D"ltr= ">Davis=C2=A0</div></div></div> --0000000000006fc2b80635bc2f91-- --===============3080958877566270145== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============3080958877566270145== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Swig-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/swig-user --===============3080958877566270145==--