New bug listings get length of collection twice

Bug #901124 reported by William Grant
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Deryck Hodge

Bug Description

As seen in OOPS-22be944a946b54a7e06a56a3651a6a40, the beta bug listings issue the expensive COUNT(*) query twice: once to populate the model cache, and once to render the batchnav template.

We should ideally not execute it at all, and can't reasonably do it more than once.

Related branches

Deryck Hodge (deryck)
Changed in launchpad:
assignee: nobody → Deryck Hodge (deryck)
Deryck Hodge (deryck)
Changed in launchpad:
status: Triaged → In Progress
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
Revision history for this message
Deryck Hodge (deryck) wrote :

This is hard to QA properly on qastaging. I only see a single count, but that count takes 9 seconds on qastaging. On production this count was taking 3.5-4 seconds. As best I can tell this is qa-ok, so I'll mark it as such, but qastaging makes it a pain to really know for sure this is ok and that it fixes the issue.

tags: added: qa-ok
removed: qa-needstesting
Deryck Hodge (deryck)
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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