Bug 39491 - [EasyHack] remove superfluous and duplicate include paths
Summary: [EasyHack] remove superfluous and duplicate include paths
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyBeginner, easyHack, skillScript
Depends on:
Blocks:
 
Reported: 2011-07-23 06:55 UTC by Björn Michaelsen
Modified: 2015-12-15 16:24 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
remove nonexistent include paths (11.74 KB, patch)
2012-01-21 16:06 UTC, Matúš Kukan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Björn Michaelsen 2011-07-23 06:55:24 UTC
superfluous include paths can slow the build down by quite a measureable amount. With the integration of gnumake4 it is possible to set CXXFLAGS on the compile.
Thus on Linux, with:
 make CXXFLAGS="-v" -srj30 -l9 2>&1 | grep nonexistent | sort | uniq
one can get an idea of include paths, that might be superfluous. But beware of paths that might still be needed on other platforms!
Also ordering the include paths (and removing dupes) might improve performance a bit (and make the output a lot more readable).
Comment 1 Björn Michaelsen 2011-07-23 07:19:45 UTC
current candidates from tail_build:
workspace/res
workspace/solenv/inc/Xp31
workspace/solenv/unxlngx6/inc
workspace/solver/350/unxlngx6.pro/inc/stl
workspace/solver/350/unxlngx6.pro/inc/sw
workspace/solver/350/unxlngx6.pro/workdir/inc/sw
workspace/solver/350/unxlngx6.pro/workdir/inc/sw/sdi
workspace/solver/350/unxlngx6.pro/workdir/Misc/sc/
workspace/solver/350/unxlngx6.pro/workdir/Misc/sc
workspace/solver/350/unxlngx6.pro/workdir/Misc/sw/
workspace/solver/350/unxlngx6.pro/workdir/Misc/sw
/usr/lib/jvm/java-6-sun/include/native_threads/include
/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/../../../../../x86_64-linux-gnu/include
/usr/local/include/x86_64-linux-gnu
Comment 2 Matúš Kukan 2012-01-21 16:06:43 UTC
Created attachment 55938 [details]
remove nonexistent include paths

I created more patches, similar to the attached one.
Then I tried to build sw with as few include paths as possible and compare to the current state but there is no difference in speed.

I had removed quite many paths, but not from SOLARINC.
I will wait for set_soenv to be killed.
(When testing speed in sw I removed everything possible from SOLARINC in Env.Host.sh)

I think this will break ccache for one round ?
Should I push now or wait for set_soenv and remove paths also there ?
Comment 3 Matúš Kukan 2012-02-10 13:13:43 UTC
I have done:
http://cgit.freedesktop.org/libreoffice/core/commit/?id=4b30ec9def591ba77d5ec9ac09ded1e6782ede8d
http://cgit.freedesktop.org/libreoffice/core/commit/?id=12bf03351ea38fb2d2eb5e184cd455d2d019fe1a
http://cgit.freedesktop.org/libreoffice/core/commit/?id=19b33ca42f1ce38a2e58070f962f37ecae58be0d
http://cgit.freedesktop.org/libreoffice/core/commit/?id=5cabaf5a32188f24344f68fa48cbdc0a8b8cfb41

But in SOLARINC, there are still:
/usr/lib/jvm/java-6-sun/include/native_threads/include
/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/../../../../../x86_64-linux-gnu/include
/usr/local/include/x86_64-linux-gnu

I did not remove them, because I fear to break something and moreover because I have not seen any improvement in build time.
Comment 4 Björn Michaelsen 2012-02-10 13:53:39 UTC
oh, great work! closing for now as an EasyHack, might be worth a recheck in two-three releases.
Comment 5 Robinson Tryon (qubit) 2015-12-15 16:24:55 UTC
Migrating Whiteboard tags to Keywords: (EasyHack DifficultyBeginner SkillScript )
[NinjaEdit]