Hi Norbert,

On Mon, 4 Apr 2011 22:37:42 -0500
Norbert Thiebaud <[email protected]>
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

_______________________________________________
LibreOffice mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to