[MERGE] Fix for poor bzr rm * performance in trunk
Johan Walles
johan.walles at gmail.com
Tue May 5 08:21:36 BST 2009
Here's a patch that fixes the poor bzr rm * performance in bzr trunk:
https://bugs.launchpad.net/bugs/180116
The patch does two things:
* It calls osutils.minimum_path_selection() from within
workingtree_4.iter_changes() instead of using a copy of
osutils.minimum_path_selection() in there.
* It converts osutils.minimum_path_selection() into an O(n log n) algorithm.
Timings of bzr trunk without this patch (notice how it's slower than
1.13.1, not my fault though :-):
$ time rm --keep *
real 0m11.291s
user 0m7.304s
sys 0m3.880s
New timings on my system with this patch applied:
$ time bzr rm *
real 0m11.124s
user 0m7.088s
sys 0m3.920s
$ time bzr rm --keep *
real 0m9.936s
user 0m6.768s
sys 0m3.076s
So bzr rm now performs about the same with and without --keep. As a
side effect, anybody else calling osutils.minimum_path_selection() will
be faster as well.
Have fun :-) //Johan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bzr-quick-rm-star.patch
Type: text/x-patch
Size: 5671 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090505/e2eb1fbf/attachment.bin
More information about the bazaar
mailing list