Re: Parallelization of shell scripts for 'configure' etc.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2022-06-14 at 13:11 -0400, Nick Bowler wrote:
> The resulting config.h is correct but pa.sh took almost 1 minute to run
> the configure script, about ten times longer than dash takes to run the
> same script.  More than half of that time appears to be spent just
> loading the program into pa.sh, before a single shell command is
> actually executed.

Thanks for sharing that, it saves me looking into it!

I work on a cross compiling build environment (Yocto Project) and we
find that a large percentage of our build times (20%?) are in the
configure stage, either running autoreconf or configure with a 50/50
split between the two. We autoreconf since we change the macros in some
cases, e.g. libtool.

I would love to find a way to be more efficient about this part of our
builds. We do already provide some cached values for some macros to try
and be a little more efficient.

When I've profiled things, most of the time seems to be "fork" overhead
of builds having to fork new processes to run shell command pipelines.
I have sometimes wondered if we couldn't make code which was more
optimised to the common case and didn't have so much forking going on.

Cheers,

Richard








[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux