[PATCH] faster initial commit due to buffered logging
ian.clatworthy at internode.on.net
Mon May 28 12:05:56 BST 2007
The attached patch builds on the previous submitted one and includes
better comments in response to feedback from Andrew Bennetts. The main
improvement though is "smarter" logging in that the "added ..." messages
are output at the end, not in situ. To be strictly correct, the add
messages are buffered until an 'interesting' one (like 'Committed
revision xx.') is logged.
As crazy as it sounds, the impact of this patch can be dramatic on the
performance of initial imports of a code base. For Bazaar 0.16, elapsed
time drops from 11.2 secs to 5.5 secs - a 50% improvement. For the
Mozilla tree, elapsed time drops on my laptop from 24+ minutes to 17+
minutes, an improvement of around 30%.
Interestingly, the profiling data suggested that logging was taking
around 10% of the total time - a (very) high number but not enough to
explain the improvements. This looks like a case of the implicit writes
to ~/.bzr.log playing havoc with the disk heads as they are trying to
write other files. Dumping all the log messages at the end avoids this,
while also making the progress bar UI that much more useful.
Of course, we could decide to not output the 'added ...' messages at all
by default (like some other tools do) but that is arguably a bridge too
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4946 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070528/d6eae3c8/attachment.bin
More information about the bazaar