Merge lp://staging/~thumper/launchpad/bmp-index-faster into lp://staging/launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Stuart Bishop | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 11030 | ||||
Proposed branch: | lp://staging/~thumper/launchpad/bmp-index-faster | ||||
Merge into: | lp://staging/launchpad | ||||
Diff against target: |
428 lines (+191/-118) 3 files modified
lib/lp/code/browser/branch.py (+2/-108) lib/lp/code/browser/branchmergeproposal.py (+6/-10) lib/lp/code/browser/decorations.py (+183/-0) |
||||
To merge this branch: | bzr merge lp://staging/~thumper/launchpad/bmp-index-faster | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stuart Bishop (community) | Approve | ||
Review via email: mp+27788@code.staging.launchpad.net |
Commit message
Cache the bzr_identity of the source branch used when rendering new revisions on merge proposal pages.
Description of the change
Many of the slow merge proposal renderings are due to having many revisions to show, and each revision has a link to the source branch. During my investigations last week I found that every query to bzr_identity on a branch causes two DB queries. The branch wraps the branch used for the rendering of the new revisions as a DecoratedBranch - which has a cached property for the bzr_identity.
Both the DecoratedBranch and DecoratedBug were moved into their own module as they were now both being used in the branch and branchmergeproposal browser modules.
The xx-code-
Oh, there was also some drive by lint fixes in the browser branchmergeproposal module.