Comment 4 for bug 304113

Revision history for this message
Guilherme Salgado (salgado) wrote :

The queries are issued by bugtask.bug.bugtasks, which is called once for every bugtask returned by the search.

Kiko knew that was a problem and left an XXX there asking if there was a way to filter the results by their conjoined_master in the DB itself. It may be possible to do that, but given the logic I see in IBugTask.getConjoinedMaster(), I have the impression that will be at least pretty complicated.

Another option is to pre-fetch bugtask.bug and bugtask.bug.bugtasks for every bugtask in that page, but that'd require turning IBug.bugtasks into a cachedproperty and roll our own search method to also fetch all siblings of a bugtask and store that in the bugtask's bug. This seems like the only feasible solution to me.