Merge lp:~vila/bzr/857335-tags-revs-slow into lp:bzr
Status: | Merged |
---|---|
Approved by: | Vincent Ladeuil |
Approved revision: | no longer in the source branch. |
Merged at revision: | 6163 |
Proposed branch: | lp:~vila/bzr/857335-tags-revs-slow |
Merge into: | lp:bzr |
Diff against target: |
83 lines (+34/-8) 2 files modified
bzrlib/builtins.py (+31/-8) doc/en/release-notes/bzr-2.5.txt (+3/-0) |
To merge this branch: | bzr merge lp:~vila/bzr/857335-tags-revs-slow |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jelmer Vernooij (community) | Approve | ||
Review via email: mp+76763@code.launchpad.net |
Commit message
Stop reloading all ancestry for each tag when searching tags in a revision range
Description of the change
bzr tags was doing a costly ancestry check when the -rX..Y parameter was
specified.
In the worst case scenario (-r1..), this gave:
bzr: 23 secs
emacs: 19 mins
gcc: 74 mins
With this patch, we're down to:
bzr: 1.3 secs
emacs: 9.8 secs
gcc: 7.6 secs
I had to add a check for the case where X > Y in -rX..Y to comply with the
test suite which roughly says: if the range is invalid, don't output
anything. The timings mentioned in the bug report was without this check.
Using a range is still slower than no using a range which is... unfortunate
but seems out of scope as it would require unifying the various graphs
cached in the branch and the repo in various forms.
s/ouput/output/
It might be nice to split the bit of code that determines the tags for a range out into a separate method. Other than that, this seems reasonable.