Merge lp:~jameinel/bzr/2.2-move-to-front-if-changed-562429 into lp:bzr
Proposed by
John A Meinel
on 2010-04-14
| 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 | 2010-04-14 | Approve on 2010-04-14 | |
|
Review via email:
|
|||
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.
lp:~jameinel/bzr/2.2-move-to-front-if-changed-562429
updated
on 2010-04-14
- 5153. By John A Meinel on 2010-04-14
-
Avoid packing and unpacking the indices, and shortcut once you've found all
the interesting indices. - 5154. By John A Meinel on 2010-04-14
-
Restore the indices_info variable.
Code is clearer, and isn't broken under -Dindex. :)
- 5155. By John A Meinel on 2010-04-14
-
Minor tweak

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.