Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi Norbert,

On Mon, 4 Apr 2011 22:37:42 -0500
Norbert Thiebaud <nthiebaud@gmail.com>
wrote:

Sure, but I was not comparing the extra cost to the cost of a compile,
but to the intended savings.
on one hand, every time I run make I pay the cost of these redundant
stats() on the other hand every time make has to compile something I
have to pay the cost of that extra sort
(including the cost of the fork, load program, parse it - if awk or
other interpreted. And these are just fix cost, on top of the actual
sort)

I did some rough measurements and they seem to make no noticeable
difference on a full build. They will however make a noticeable
different on a partial rebuild because it greatly reduces parsing the
huge dep files.

Note that the root cause of this evil has a lot to do with our
somewhat anarchic include strategy...
maybe we should re-introduce include guards ;->

Yes, that could also be helped with by reducing unneeded includes as
follows:

1) Select one header.
2) Remove the includes of that header from all header files.
3) "Compile" all headers with make -k.
4) Check which headers still generated an object and do not have the
   header in the dep file: Those did not need the include, and did not
   get it by a transitive include. Remove the include from the header
   as it is superfluous.
5) Select next header and repeat from 2)
6) Repeat until no include can be removed.
7) Do the whole thing again with the cxx themselves.

This might churn away a lot of CPU time, but I can be done completely
automated IMHO (modulo headers that create modifing defines only,
breaking the product but not the build).

Best,

Bjoern

-- 
https://launchpad.net/~bjoern-michaelsen

Attachment: signature.asc
Description: PGP signature


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.