Re: Speeding up builds

Olly Betts via Swig-user <[email protected]> Thu, 22 May 2025 23:31:04 +0100
Newsgroups gmane.comp.programming.swig
Message-ID <[email protected]>
On Thu, May 22, 2025 at 11:43:35AM -0500, Davis C. wrote:
> 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.

There's currently no multi-threading in the swig binary (there's not a
lot of obvious scope for parallelism so it would probably be hard to
usefully introduce).

However it really shouldn't take anything like 22 minute to run.  Unless
you're feeding it an enormous generated header I think you must be
triggering some particular pathological case, so identifying and fixing
that should reduce the time taken to something more reasonable.

My first suggestion would be to make sure you're using the latest
version in case this has already been addressed.

If you are, can you profile and see where most of the time is being
spent?

Cheers,
    Olly