Displaying bug patch badges in listing is inefficient, causes many timeouts

Bug #512262 reported by Eleanor Berger
60
This bug affects 10 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Eleanor Berger

Bug Description

The way we query for patches to display as badges on bug listings is very inefficient (one query per bug) and causes many timeouts.

Related branches

Revision history for this message
Eleanor Berger (intellectronica) wrote :

See OOPS-1486ED402 for example.

Revision history for this message
Eleanor Berger (intellectronica) wrote :

~jml, who also gets to say "i told you so", having spotted the problem in review, tells me that may be a good example of how this can be optimized is found in lib/lp/code/browser/branchlisting.py

Revision history for this message
Björn Tillenius (bjornt) wrote : Re: [Bug 512262] Re: Displaying bug patch badges in listing is inefficient, causes many timeouts

On Mon, Jan 25, 2010 at 10:15:25AM -0000, Tom Berger wrote:
> ~jml, who also gets to say "i told you so", having spotted the problem
> in review, tells me that may be a good example of how this can be
> optimized is found in lib/lp/code/browser/branchlisting.py

I would suggest looking in lib/lp/bugs/browser/bugtask.py insted, to see
how it's done for the rest of the badges in the bug listings. Search for
BugListingBatchNavigator. It should be easy to extend it to handle
patches as well.

Changed in malone:
status: Triaged → In Progress
assignee: nobody → Tom Berger (intellectronica)
assignee: Tom Berger (intellectronica) → nobody
milestone: 10.01 → none
Changed in malone:
status: In Progress → New
importance: High → Undecided
Changed in malone:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Tom Berger (intellectronica)
milestone: none → 10.01
Revision history for this message
Eleanor Berger (intellectronica) wrote :

Tested the fix on staging and it works well.

Changed in malone:
importance: High → Critical
Deryck Hodge (deryck)
Changed in malone:
status: In Progress → Fix Committed
Ursula Junque (ursinha)
tags: added: current-rollout-blocker
Ursula Junque (ursinha)
tags: removed: oops
Changed in malone:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.