Merge lp://staging/~jameinel/loggerhead/page_loading into lp://staging/loggerhead

Proposed by John A Meinel
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
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

To post a comment you must log in.
Revision history for this message
Matt Nordhoff (mnordhoff) wrote :

26 + revlist = list(
27 + self.get_short_revision_history_by_fileid(file_id, revid))

get_short_revision_history_by_fileid() does not take a second argument, just file_id.

Other than that, "@_@" again.

review: Abstain
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Assuming it works (yeah, sorry about the non-existent test suite), I think this looks good.

review: Approve
413. By John A Meinel

Fix the api call.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches