Fwd: [RFC][MERGE] Avoid using revision_history() in RevisionSpec when possible
Lukáš Lalinský
lalinsky at gmail.com
Wed Jan 16 14:28:38 GMT 2008
Resending to the list again, because I'd really like to see opinions
on this patch.
---------- Forwarded message ----------
From: Lukáš Lalinský <lalinsky at gmail.com>
Date: Dec 4, 2007 12:21 AM
Subject: [RFC][MERGE] Avoid using revision_history() in RevisionSpec
when possible
To: bazaar <bazaar at lists.canonical.com>
Hi,
this patch implements BzrBranch6.get_rev_id, which is (thanks to
last-revision) possible to do incrementally without loading the whole
history. In the worst case it shouldn't be slower than the previous
method, in the best case it can avoid touching the index at all. For the
last revision you get:
$ time bzr diff -c -1 >/dev/null
real 0m7.844s
user 0m7.404s
sys 0m0.244s
$ time bzr diff -c -1 >/dev/null
real 0m0.882s
user 0m0.800s
sys 0m0.056s
For the 10th revision from the end:
$ time bzr diff -c -10 >/dev/null
real 0m7.762s
user 0m7.324s
sys 0m0.296s
$ time ./bzr diff -c -10 >/dev/null
real 0m0.957s
user 0m0.820s
sys 0m0.092s
And for the first revision:
$ time bzr diff -c 1 >/dev/null
real 0m7.728s
user 0m6.720s
sys 0m0.364s
$ time bzr diff -c 1 >/dev/null
real 0m7.619s
user 0m7.180s
sys 0m0.292s
So it seems to help, but I'm not sure if it's implemented the right
way...
Lukas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bzr-mail-Br7ooI.patch
Type: text/x-patch
Size: 27498 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080116/3587b84b/attachment-0001.bin
More information about the bazaar
mailing list