Merge lp:~sinzui/launchpad/milestone-table-bug-490648 into lp:launchpad
Proposed by
Curtis Hovey
Status: | Merged |
---|---|
Approved by: | Curtis Hovey |
Approved revision: | not available |
Merged at revision: | not available |
Proposed branch: | lp:~sinzui/launchpad/milestone-table-bug-490648 |
Merge into: | lp:launchpad |
Diff against target: |
129 lines (+34/-8) 4 files modified
lib/lp/registry/browser/configure.zcml (+1/-0) lib/lp/registry/browser/milestone.py (+15/-2) lib/lp/registry/browser/tests/milestone-views.txt (+14/-2) lib/lp/registry/templates/productseries-milestone-table-row.pt (+4/-4) |
To merge this branch: | bzr merge lp:~sinzui/launchpad/milestone-table-bug-490648 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gavin Panella (community) | Approve | ||
Review via email:
|
To post a comment you must log in.
This is my branch to improve the performance of milestone table rows.
Remove the duplicate queries and do not query objects that will not be used.
lp:~sinzui/launchpad/milestone-table-bug-490648 /bugs.launchpad .net/bugs/ 490648 implementation: no one
Diff size: 112
Launchpad bug: https:/
Test command: ./bin/test -vv -t "reg.*milestone"
Pre-
Target release: 3.1.12
= Improve the performance of the milestone table rows =
For each milestone that is shown in the milestone table, the release is looked ription is looked up once, but never ription is gotten because
up three times and the structuralsubsc
used. The MilestoneView provides the release as view/release. The other two
uses must use the view's copy. The structuralsubsc
the navigation menu is used to get the edit link. A new menu is needed that
only provides the edit link to ensure the extra db call is made.
== Rules ==
* Create a navigation menu for the MilestoneView (used by portlets and
tables) to provide only th links needed.
* Update the template to use the view's copy of the release.
== QA ==
Comparing https:/ /edge.launchpad .net/launchpad- registry/ 3.1 with /launchpad. net/launchpad- registry/ 3.1, there should be 12
https:/
fewer queries.
== Lint ==
Linting changed files: registry/ browser/ configure. zcml registry/ browser/ milestone. py registry/ browser/ tests/milestone -views. txt registry/ templates/ productseries- milestone- table-row. pt
lib/lp/
lib/lp/
lib/lp/
lib/lp/
== Test ==
* lib/lp/ registry/ browser/ tests/milestone -views. txt
* Added a test to verify the link in the new menu is legitimate.
== Implementation ==
* lib/lp/ registry/ browser/ configure. zcml registry/ browser/ milestone. py registry/ templates/ productseries- milestone- table-row. pt
* Registered the new menu.
* lib/lp/
* Added a new navigation menu and updated MilestoneView to use it.
* lib/lp/
* Updated the template to use the new menu.
* Replaced the 2 calls to product_release to use the view's release.