Merge lp://staging/~jameinel/loggerhead/page_loading into lp://staging/loggerhead
Status: | Merged |
---|---|
Approved by: | Michael Hudson-Doyle |
Approved revision: | 413 |
Merged at revision: | 422 |
Proposed branch: | lp://staging/~jameinel/loggerhead/page_loading |
Merge into: | lp://staging/loggerhead |
Diff against target: |
91 lines (+41/-7) 2 files modified
loggerhead/controllers/changelog_ui.py (+2/-1) loggerhead/history.py (+39/-6) |
To merge this branch: | bzr merge lp://staging/~jameinel/loggerhead/page_loading |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Hudson-Doyle | Approve | ||
Matt Nordhoff | Abstain | ||
Review via email: mp+24165@code.staging.launchpad.net |
Description of the change
Another improvement found while touching loggerhead for the history-db code.
At the moment, calling History.get_view() for 'changes' grabs the entire history of the branch just to serve the first 20-or-so revisions.
The requirement is that we want to know what target URL to put for the "Next" and "Previous" links. So what we actually need is just target + page + next_page + prev_page revisions. This changes it to generate Tip => next_page. So it generates too many revisions in the case that you start say 100 revisions from the tip. But it doesn't generate so many extra tail revisions.
On my machine, this changes 'changes' (with a populated cache):
bzr.dev 0.195s => 0.155s
emacs 0.674s => 0.312s
26 + revlist = list( short_revision_ history_ by_fileid( file_id, revid))
27 + self.get_
get_short_ revision_ history_ by_fileid( ) does not take a second argument, just file_id.
Other than that, "@_@" again.