OK, this bug is a bit of "death by a thousand paper cuts," but looking at the OOPS, it looks like we can cut out a lot of fat with some small changes.
- about 4093 milliseconds can be removed from https://lp-oops.canonical.com/oops.py/?oopsid=2023D24 by cacheing the decision of whether a person is in a bug's administrated teams (the most repeated query in the OOPS analysis) in personsubscriptioninfo.py.
- The longest single query (1269 ms) comes from listifying bug.getSubscribersForPerson(self.user). I'm not sure how to improve that query for this case, but I can look at it.
- The next longest query (1215 ms) comes from getting all the subscriptions in a single big query. This is already optimized from getting the subscriptions singly. As before, I can look at this.
I think I'll stop analyzing and start making this fix (the one in personsubscriptioninfo.py). We can find more optimizations, but this one is such an easy and big win that I should just do it.
OK, this bug is a bit of "death by a thousand paper cuts," but looking at the OOPS, it looks like we can cut out a lot of fat with some small changes.
- about 4093 milliseconds can be removed from https:/ /lp-oops. canonical. com/oops. py/?oopsid= 2023D24 by cacheing the decision of whether a person is in a bug's administrated teams (the most repeated query in the OOPS analysis) in personsubscript ioninfo. py.
- The longest single query (1269 ms) comes from listifying bug.getSubscrib ersForPerson( self.user) . I'm not sure how to improve that query for this case, but I can look at it.
- The next longest query (1215 ms) comes from getting all the subscriptions in a single big query. This is already optimized from getting the subscriptions singly. As before, I can look at this.
For https:/ /lp-oops. canonical. com/oops. py/?oopsid= 2064O33 (from comment 8), the first change will save 3632 ms.
I think I'll stop analyzing and start making this fix (the one in personsubscript ioninfo. py). We can find more optimizations, but this one is such an easy and big win that I should just do it.