Build-system performance optimization
Norman Feske
norman.feske at ...1...
Fri Oct 28 11:48:03 CEST 2011
Hello,
since I replaced the HDD of my development machine with a SSD, I
experienced quite a boost of build performance. However, at the same
time, it became apparent to me that the first stage of our build system
consumes too much time considering the simple task it performs (finding
inter-library dependencies). This prompted me to spend a relaxing
evening to do some profiling, which uncovered a surprising hot spot: The
calls of 'echo' for generating the 'var/libdeps' file.
As result of my investigation, you can find two optimizations in SVN rev
190, which boosts the performance of the first build stage by factor 3
to 6 (depending on how comprehensive the actual build is) - at least on
my machine.
The first optimization is the eager detection of already visited
libraries to prevent the build system from visiting them again
(originally, this detection was performed later when already revisiting
the library). This change improves the performance by circa 10%. Second
and more importantly, subsequent echo commands are now batched into one
command featuring multiple echoes. This way, only one shell is started
for executing the whole sequence, which attributes for the significant
performance gain mentioned above.
This patch makes working with the Genode build system much more
enjoyable for me - hopefully for you as well.
Cheers
Norman
--
Dr.-Ing. Norman Feske
Genode Labs
http://www.genode-labs.com · http://genode.org
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
More information about the users
mailing list