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

Bug #512262 reported by Eleanor Berger on 2010-01-25
60
This bug affects 10 people
Affects Status Importance Assigned to Milestone
Launchpad itself
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

See OOPS-1486ED402 for example.

~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

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

Tested the fix on staging and it works well.

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

Other bug subscribers