https://bugs.freedesktop.org/show_bug.cgi?id=42949

             Bug #: 42949
           Summary: EasyHack: accelerating compile times ...
    Classification: Unclassified
           Product: LibreOffice
           Version: unspecified
          Platform: Other
        OS/Version: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Libreoffice
        AssignedTo: [email protected]
        ReportedBy: [email protected]


One of our problems is that compile times are too slow; part of the reason for
this is header explosion - such that we parse and compile the same things again
and again for each module. If we can identify headers that are included
un-necessarily many times, then we should be able to accelerate the build for
everyone.

After a build - we have full library dependencies in .d files, such that:

cat workdir/unxlngi6.pro/Dep/LinkTarget/Library/*.d | grep '^ ' | sed
's/\\.*//' | sort | uniq -c | sort -n > /tmp/headers.includes
for a in `cat /tmp/headers.includes`; do if test -f /opt/libreoffice/core/$a;
then wc -c $a; else echo -n "$a        "; fi; done > /tmp/headers.csv

ONO. should give us a /tmp/headers.csv that has the size and include count of
each header in the build [ presumably a faster, perl tool could be used to
generate this ;-].

By multiplying these, we can get an estimate of the 'weight' that a header
provides to the build; hence:

bytes to parse    include count size  filename
741439564    4454    166466   
/opt/libreoffice/core/solver/unxlngi6.pro/inc/boost/preprocessor/seq/fold_left.hpp
 
416181480    6754    61620   
/opt/libreoffice/core/solver/unxlngi6.pro/inc/rtl/ustring.hxx                   
Shows we parse 740Mb of the same file over 4000 includes - for the set of files
I grokked. I up-loaded a spreadsheet here:
http://users.freedesktop.org/~michael/headers.ods - but the include counts look
suspiciously low here.

Anyhow - having found our problem headers; we then need to work out how we can
reduce their use - preferably by finding out where such headers are included
from, and how to reduce their use [ by adding class Foo; forward definitions
eg. ].

Clearly that's not going to work for eg. the string classes which are used
everywhere, but quite possibly we can reduce the boost/ related wasteage, as
well as help to identify future areas for improvement (eg. aggregating
OutputDevice from Window, rather than including it :-)

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to