[Linux-ha-dev] Re: [Bug 137] New: configure.in: remove unused checks and defines

Soffen, Matthew msoffen at iso-ne.com
Tue Oct 5 08:39:55 MDT 2004


Actually, I'm testing right now a means to just have configure.in set the
caching on ( if that isn't a problem ).

That way its one less configuration flag that needs to be set when running
things. 

Matt

-----Original Message-----
From: Lars Ellenberg [mailto:l.g.e at web.de]
Sent: Tuesday, October 05, 2004 10:26 AM
To: High-Availability Linux Development List
Subject: Re: [Linux-ha-dev] Re: [Bug 137] New: configure.in: remove
unused checks and defines


/ 2004-10-04 16:51:07 -0600
\ Alan Robertson:
> >just add -C to the default flags.
> >./ConfigureMe cf -C
> >
> >then, the configure run in libltdl already gets most from the cache.
> >
> >large time of configure is spend in config.status
> >processing the various *.in files, though.
> >no good way to improve that, probably.
> >
> >in any case, it is only a fraction of the build time in a clean tree.
> 
> If you're building an RPM, it does FOUR (count 'em FOUR) configures.  So, 
> that fraction is probably 30%.

then that is even a reason to use an absolute pathname for the
config.cache, like
./ConfigureMe rpm --cache-file=$HOME/config.cache@$HOSTNAME

for the fun of it, I timed it.

the bottom line is, with any cache, configure in ltdl will take only 4
instead of 11 seconds (because it uses the cache generated during the
main configure run), and once it is created, additional main configure
runs drops from 1:20 to 0:35, and 26 of it is the config.status run. 
with an absolute pathname, the configure run inside the rpmbuild
can benefit from the first in the main source tree, too.

the realtions probably stand for different boxes, still.

exec.log best viewed with less -S :)

I only give the overall results, and the results for the various
configures here:

# start really clean.
make distclean; rm configure

myshell ./ConfigureMe rpm --with-crm
       real:10.63 user:6.08 sys:3.02  (configure in libltdl
    real:79.49 user:62.30 sys:12.55   (bootstrap)
  real:261.18 user:194.80 sys:51.01   (total)

myshell ./ConfigureMe rpm --with-crm
  real:237.53 user:172.49 sys:49.65   (total)

so, not needing bootstrap, but only configure
and maybe some other steps left out saves 20/260 == 7.6%


CONF_CACHE=$HOME/config.cache@$HOSTNAME
> $CONF_CACHE
myshell ./ConfigureMe rpm --with-crm --cache-file=$CONF_CACHE
         real:4.34 user:1.98 sys:1.30 (configure in libltdl)
    (configure run with initial config.cache creation.
     hm. obviously somewhere there is /bin/sh hardcoded,
     bypassed myshell. but from other runs I can say it was
     only a like 4 seconds quicker than bootstrap above)
  real:214.78 user:156.98 sys:43.82   (total)

using a config.cache with an absolute pathname
saves 45/260 == 17.3%

myshell ./ConfigureMe rpm --with-crm --cache-file=$CONF_CACHE
         real:4.50 user:2.03 sys:1.27 (configure in libltdl)
    ( this time, the cache could be reused
      for the main configure run, too: 36 seconds instead of 75)
  real:201.25 user:145.60 sys:39.76   (total)

and once it was created for this box (which is unlikely to change its
configuration too often), the config.cache can be reused.
saves even more: 60/260 == 23.0%

if we take the last total time as reference (200 seconds),
and subtract the remaining configure time (two times 36 seconds),
we have 92/200 == 46.0% ( good guess, Alan! )
event with the config.cache, still almost half the time is spent in
configure. optimizing away the libltdl configure seems not to count, it
is about 10 percent of the total configure time.
the most time is spent in config.status runs in the top dir, and the
same again in the rpmbuild topdir, which is 26 seconds each (26/200 ==
13.0).

by using the config.cache with an absolute pathname,
we already gained much:
without config.cache: 150/260 == 61.5% ... doh. does not sound sensible.
with    config.cache:  92/200 == 46.0%
BUT.  we already saved (150-92)/150 == 38.6% of the total configure time.
I really doubt that by leaving out some AC_* from configure.in this can
be much more improved, as said, most of the time is in config.status,
and that is a generated huge "compatible shell" script, and that
compatible crap won't shrink much because of some less sed
substitutions.

but just in case it can be improved,
I attached an other script, and an output excerpt, which marks those
defines/substitutions that are used at most in one file (appart from
configure.in and config.h). some of them are "false negatives", but
I just wanted you to have a look at them, anyways.

cheers,

	Lars Ellenberg




More information about the Linux-HA-Dev mailing list