searchTasks much slower than reading bug collections

Bug #742217 reported by Martin Pool
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Invalid
Low
Martin Pool

Bug Description

My experiment in <https://bugs.launchpad.net/kanban/+bug/712924> showed that calling searchTasks was much slower than reading the bug collections, even though it ought to be reading fewer bugs. I have not dug in to why, but the results ought to be reproducible running lp:~mbp/kanban/712924-fixed-bugs vs trunk.

Revision history for this message
Robert Collins (lifeless) wrote :

Which collections in particular, and what searchTask parameters?

The collections backend onto searchTasks internally, so this is in principle impossible, unless you are comparing apples and oranges.

Changed in launchpad:
status: Triaged → Incomplete
Revision history for this message
Martin Pool (mbp) wrote :

Bugtasks. There is a complete reproduction in the linked branch. If it can no longer be reproduced, great, close it.

Lots of bugs are in principle impossible, 'and yet it moves'.

Changed in launchpad:
status: Incomplete → Confirmed
status: Confirmed → Triaged
Revision history for this message
Martin Pool (mbp) wrote :

The diff that caused performance to get worse is attached.

I will try to make a short selfcontained example.

Revision history for this message
Robert Collins (lifeless) wrote :

What would be ideal is two urls that should contain the same bug collection but that take different times to render.

Revision history for this message
Martin Pool (mbp) wrote :

I have an attempted reproduction in lp:~mbp/+junk/repro-742217 but it is no longer slower. Which is good ,I guess, though surprising.

Changed in launchpad:
assignee: nobody → Martin Pool (mbp)
Revision history for this message
Martin Pool (mbp) wrote :

However, using my kanban branch still finds that doing two separate queries is slower (1:57 vs 1:47 for ~mbp). So I guess the attempted reproduction script is not accurate.

Revision history for this message
Martin Pool (mbp) wrote :

My kanban changes, because of bug 742250, were not fetching exactly the same set of bugs before and after that change, so it's just possible that accounts for some of the difference, but it would be surprising if it accounted for the 30% difference between the two approaches.

Generating jelmer's kanban is 634s with the more selective queries, and 668s bringing back every assigned bug and filtering on the client (5% slower). I would have expected the former would be much faster, but I guess the overall time is so dominated by tracing the linked objects that bringing back a few less bugs in the top-level query barely matters.

I think there was an effect in February, but some other change in Launchpad has made it go away. At the moment the difference between the two approaches is lost in the noise of round trips.

Changed in launchpad:
status: Triaged → Invalid
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.