bug.attachments loads all messages to determine message indices

Bug #626542 reported by Robert Collins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
High
Unassigned

Bug Description

Bug.attachments eager loads the messages for each attachment in order to avoid O(N^2) (or possibly O(N^N) behaviour determining the canonical urls for each message.

It would be nice if it could simply get that via the message - e.g. have bug attachment link to bugmessage and bugmessage can have the message index in that bug, so we wouldn't need to load all the message, just those with attachments.

Deryck Hodge (deryck)
Changed in malone:
status: New → Triaged
importance: Undecided → High
tags: added: attachments performance
Revision history for this message
Robert Collins (lifeless) wrote :

We've done the schema change, this is now trivial to fix.

summary: - bug.attachments has to load all messages to determine message indices
+ bug.attachments loads all messages to determine message indices
tags: added: easy
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.