Merge lp:~thumper/launchpad/bmp-index-faster into lp:launchpad
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Stuart Bishop on 2010-06-17 | ||||
| Approved revision: | no longer in the source branch. | ||||
| Merged at revision: | 11030 | ||||
| Proposed branch: | lp:~thumper/launchpad/bmp-index-faster | ||||
| Merge into: | lp: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:~thumper/launchpad/bmp-index-faster | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Stuart Bishop | 2010-06-17 | Approve on 2010-06-17 | |
|
Review via email:
|
|||
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-
| Tim Penhey (thumper) wrote : | # |
| Stuart Bishop (stub) wrote : | # |
I notice neither DecoratedBug nor DecoratedBranch have docstrings, nor do they define an interface making them inscrutable. This is particularly confusing for DecoratedBug which provides self.tasks, self.bugtasks, self.bugtask, self.getBugTask(), self.default_
We can let this slide on this branch though since this is moving code to a better location, so a net win. It would be nice to merge the synonyms and document things though if possible.
Otherwise all fine.
| Tim Penhey (thumper) wrote : | # |
On Thu, 17 Jun 2010 17:07:26 you wrote:
> Review: Approve
> I notice neither DecoratedBug nor DecoratedBranch have docstrings, nor do
> they define an interface making them inscrutable. This is particularly
> confusing for DecoratedBug which provides self.tasks, self.bugtasks,
> self.bugtask, self.getBugTask(), self.default_
> synonyms and some of them (getBugTask() and bugtask) return different
> things despite their names indicating the are synonyms.
>
> We can let this slide on this branch though since this is moving code to a
> better location, so a net win. It would be nice to merge the synonyms and
> document things though if possible.
>
> Otherwise all fine.
Thanks.
Did some docstring additions and simplified the bugtasks.
Tim

Oh, there was also some drive by lint fixes in the browser branchmergeproposal module.