[Libreoffice] a faster gnumake ? ...
michael.meeks at novell.com
Mon Apr 4 07:07:32 PDT 2011
Annoyed by the ~12 second incremental do-nothing build-time of writer,
and anticipating the growth of this as we gnu-make-ise the entire build
[ and I appreciate this is better than before but just up-front ;-]. I
did a bit of profiling.
$ time make
[ build ALL ] top level modules: sw
[ build ALL ] loaded modules: sw
[ build CHK ] loaded modules: sw
make: Nothing to be done for `allandcheck'.
* Thought one:
Having done an strace - it seems to me that over 2 seconds of that
system time (and I have a fast machine) is consumed simply with stat
syscalls; the attached stat.c does a (typical) stat call 770k times and
it takes me 2 seconds. 97% of our syscalls are 'stats' (770k of them),
and of course they are almost all for the same files.
http://users.freedesktop.org/~michael/stat-counts.txt - for the full list
So - the thought is: *why* is gnumake doing this work again and again ?
*surely* we know what output files a make rule touches [ and if we do
not we have problems anyway ], and thus we should know that no files
have changed since last time; can we not assume that and save a ton of
* Thought two
Amdahl is not kind to people optimising the 20% instead of the 80%, but
perhaps other silliness is tied to this.
Have we done any investigation on what is going on in the guts of make
there ? why is it so paranoid as to stat the same files 1000 times or
It'd be nice to know if any further thinking / deeper digging has gone
on here, before looking myself.
Thoughts appreciated :-)
michael.meeks at novell.com <><, Pseudo Engineer, itinerant idiot
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 374 bytes
Desc: not available
More information about the LibreOffice