Merge lp:~jameinel/bzr/2.2-move-to-front-if-changed-562429 into lp:bzr
Proposed by
John A Meinel
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | not available | ||||
Proposed branch: | lp:~jameinel/bzr/2.2-move-to-front-if-changed-562429 | ||||
Merge into: | lp:bzr | ||||
Diff against target: |
66 lines (+25/-9) 2 files modified
NEWS (+4/-0) bzrlib/index.py (+21/-9) |
||||
To merge this branch: | bzr merge lp:~jameinel/bzr/2.2-move-to-front-if-changed-562429 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Andrew Bennetts | Approve | ||
Review via email: mp+23371@code.launchpad.net |
Description of the change
I haven't actually confirmed that this fixes bug #562429, but it fits the symptoms, and it does fix a problem that *I* encountered.
Basically, spiv's new 'reorder indexes' code works well, but it tries to re-order even when the indexes are already at the beginning.
This is a pretty trivial change, but in my case:
branch.
drops from 1.4s down to 0.62s.
To post a comment you must log in.
Makes sense, and thanks for improving my code!
I wonder if it would be faster again to teach iter_entries not to call _move_to_front at all if len(hit_indices) == num. of times it looped through 'for index in self._indices'? Probably not much.