Closed GoogleCodeExporter closed 9 years ago
I came across this problem as well, it was so annoying I have written my own
fix for it.
My build was taking 7.6 seconds to complete a do-nothing build. My fix for this
problem reduces the do-nothing build time down to 1.5 seconds. A 5 times speed
increase.
The main cause of the issue was the re-hashing of large (50 MB) pre-compiled
header files many times through out the build.
To work around this I introduced a "Hash Cache" dictionary to store all
previously calculated hashes. The Hash Cache is only updated with new hashes or
hashes of build outputs.
The final icing on the cake is to ensure all file names of dependencies or
outputs are fully normalised so that they always match to same entry in the
Hash Cache.
I have code for this change that I can supply if you want to add this
improvement to fabricate.
Simon.
Original comment by simon.al...@gmail.com
on 11 May 2011 at 10:55
Hi Simon -- great, thanks for that! Yeah, if you could send through a diff
(attach it to this bug), that'd be great.
Original comment by benh...@gmail.com
on 11 May 2011 at 1:14
Attached is the current diff for my modifications.
Works very well with my current build system. Will let you know if I find any
problems with the changes.
Simon.
Original comment by simon.al...@gmail.com
on 12 May 2011 at 8:29
Attachments:
Applied Simon's patch in r118 (thanks!). You can see the speed difference here:
http://code.google.com/p/fabricate/source/diff?spec=svn119&r=119&format=side&pat
h=/wiki/Benchmarks.wiki
You'll notice that AtimesRunner is so slow it doesn't really do anything for
that. However, StraceRunner is fast, and it sped it up 2.4x in the benchmark.py
benchmark.
Original comment by benh...@gmail.com
on 14 Jun 2011 at 1:55
Original issue reported on code.google.com by
benh...@gmail.com
on 7 Aug 2009 at 2:06