time out on +milestone page with high statement count

Bug #381364 reported by Diogo Matsubara
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Unassigned

Bug Description

As seen in OOPS-1243F518 the new +milestone page is timing out with a high statement count

The worst offenders, repetion-wise are:

1 492 2978 6 2972 SELECT COUNT(*) FROM Specification, SpecificationBug WHERE SpecificationBug.bug = %s AND Specification.id = SpecificationBug.specification
2 492 2615 5 2610 SELECT COUNT(*) FROM MentoringOffer WHERE MentoringOffer.bug = %s
3 492 1738 3 1735 SELECT COUNT(*) FROM BugBranch WHERE BugBranch.bug = %s

Curtis Hovey (sinzui)
Changed in launchpad-registry:
assignee: nobody → Curtis Hovey (sinzui)
milestone: none → 2.2.5
Revision history for this message
Curtis Hovey (sinzui) wrote :

The badges macro is very expensive to use with a large set of bugs. It calls the db for spec, branch, and mentor each for each bug. The right way to do this is to pass all the bugs to a helper that gets the information in a single query,

Curtis Hovey (sinzui)
Changed in launchpad-registry:
status: Triaged → In Progress
Curtis Hovey (sinzui)
Changed in launchpad-registry:
milestone: 2.2.5 → 2.2.6
Curtis Hovey (sinzui)
tags: added: story-series-milestones-releases
removed: registry-projects
Revision history for this message
Curtis Hovey (sinzui) wrote :

Fixed in launchpad devel r8494.

Changed in launchpad-registry:
status: In Progress → Fix Committed
Revision history for this message
Curtis Hovey (sinzui) wrote :

CPed 2009-06-03.

Changed in launchpad-registry:
status: Fix Committed → Fix Released
Curtis Hovey (sinzui)
Changed in launchpad:
assignee: Curtis Hovey (sinzui) → nobody
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.