Menu performance fix - only render required links
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Medium
|
Ian Booth |
Bug Description
When rendering pages/views, there are performance issues in the way menus are handled. Two relevant examples:
1. Many templates define an instance of a menu at the start of the markup to avoid the cost of duplicate instances, but we know that the menu will be reinstantiated in a portlet. Creating reusable markup often means death by menu queries
2. canonical.
A performance oops illustrating a concrete impact of this problem:
OOPS-1737M2079 Person:
One fix is to modify menu infrastructure so that only the menu links are only instantiated as required by the page template. This solves the major performance issue and means the impact of creating the same menu instances more than once are eliminated for all practical purposes.
Related branches
- Robert Collins (community): Approve
- Launchpad code reviewers: Pending (code) requested
-
Diff: 442 lines (+181/-101)3 files modifiedlib/canonical/launchpad/doc/menus.txt (+5/-2)
lib/canonical/launchpad/webapp/menu.py (+91/-59)
lib/lp/app/browser/tales.py (+85/-40)
Changed in launchpad: | |
status: | New → In Progress |
affects: | launchpad → launchpad-foundations |
tags: |
added: qa-ok removed: qa-needstesting |
Changed in launchpad-foundations: | |
status: | Fix Committed → Fix Released |
Fixed in stable r11838 <http:// bazaar. launchpad. net/~launchpad- pqm/launchpad/ stable/ revision/ 11838>.