Merge lp:~brian-murray/launchpad/display-dupe-in-portlet-dupe-subscribers into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Brian Murray on 2010-09-10 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 11531 |
| Proposed branch: | lp:~brian-murray/launchpad/display-dupe-in-portlet-dupe-subscribers |
| Merge into: | lp:launchpad |
| Diff against target: |
146 lines (+46/-11) 5 files modified
lib/lp/bugs/doc/bugsubscription.txt (+4/-4) lib/lp/bugs/interfaces/bugsubscription.py (+4/-0) lib/lp/bugs/model/bugsubscription.py (+10/-1) lib/lp/bugs/stories/bugs/xx-bug-personal-subscriptions.txt (+4/-4) lib/lp/bugs/templates/bug-portlet-dupe-subscribers-content.pt (+24/-2) |
| To merge this branch: | bzr merge lp:~brian-murray/launchpad/display-dupe-in-portlet-dupe-subscribers |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Abel Deuring (community) | code | Approve on 2010-09-10 | |
| Robert Collins (community) | 2010-09-02 | Needs Fixing on 2010-09-08 | |
| Matthew Revell | text | 2010-09-03 | Pending |
|
Review via email:
|
|||
Commit Message
Display the number of the duplicate bug to which a subscriber is subscribed in the subscriptions from duplicates portlet.
Description of the Change
When a bug has a lot of duplicates and subscribers from duplicates it would be useful to know which duplicate you were subscribed to without checking every single duplicate bug to find out.
Instead you can mouse over your name in the subscription and find out to which one you are subscribed.
Test modified:
bin/test -cvvt bugsubscription.txt xx-bug-
I'd be happy to continue using the macro"bug/
| Robert Collins (lifeless) wrote : | # |
| Brad Crittenden (bac) wrote : | # |
I'm adding Matthew Revell for a text review. Personally I think the phrase "Subscribed themselves" needs to be reworked. I hate using a the plural to represent a person of non-determined gender in general but it seem particularly clumsy here. Matthew may disagree.
| Brian Murray (brian-murray) wrote : | # |
Only one additional query, per duplicate subscriber, is ran with this change. Looking at the bug-portlet-
No, I did not consider reworking the subscribers portlet. Primarily, because I happened to learning about page templates and how they work and remembered a bug I'd reported and thought it'd be a quick and easy change. However, the subscriber name is actually shortened (tal:block replace=
| Robert Collins (lifeless) wrote : | # |
On Thu, Sep 9, 2010 at 8:57 AM, Brian Murray <email address hidden> wrote:
> Only one additional query, per duplicate subscriber, is ran with this change.
Thats *huge*. Alarm bells should be going off in your head right now.
Bugs commonly peak at 40 or more duplicates.
Every one of those duplicates will have *at least* one subscriber (the
filer) + structural subscribptions [perhaps not impacted].
> Looking at the bug-portlet-
Adding 1 is a boundary case: when testing, please always add 2, or 10,
to be really sure.
> No, I did not consider reworking the subscribers portlet. Primarily, because I happened to learning about page templates and how they work and remembered a bug I'd reported and thought it'd be a quick and easy change. However, the subscriber name is actually shortened (tal:block replace=
It seems nicer to rework the portlet to me. Anyhow, with the scaling
factor you have this change will cause performance regressions if
landed, so I'm going to set it to WIP & needs fixing.
Thanks,
Rob
| Matthew Revell (matthew.revell) wrote : | # |
> I'm adding Matthew Revell for a text review. Personally I think the phrase
> "Subscribed themselves" needs to be reworked. I hate using a the plural to
> represent a person of non-determined gender in general but it seem
> particularly clumsy here. Matthew may disagree.
"Themself" would be the more correct use of the unspecified sex pronoun. While I'm comfortable with the singular "they", I'm not sure it reads that well here. I don't have particularly good suggestions for a replacement, though.
Suggested alternative: Self-subscribed
Interesting notes on usage of singular "they" -- http://
| Brian Murray (brian-murray) wrote : | # |
I've modified the bugsubscription interface to include a bugID which reduces the quantity of database queries as shown below. I hope this is sufficient.
# of dup subs Devel Old Branch New Branch
0 24,25 24 24,25
1 26,27 27 26
2 28 29 28
3 29 31,32 29
I've also changed the wording from "Subscribed themselves" to "Self-subscribed" as suggested by Matthew.
| Robert Collins (lifeless) wrote : | # |
The table formatted awkwardly.
Can you confirm:
(dup subs, devel, old proposal, current proposal)
(0, 24, 24, 25)
(1, 26, 27, 26)
(2, 28, 29, 28)
(3, 29, 32, 29)
This is certainly better. It appears to still scale with duplication
subscriptions which is a problem. (And the query count is still quite
large: for a portlet like this, 10-15 queries is what I'd expect).
I haven't reviewed the code yet, but on the sheer performance size,
these query counts (which are only a surrogate) are at least no-worse.
If you want to grab an OCR to review this your friday, please do :
don't block on me looking at the actual change - whomever reviews it
can advise on the tastefulness of your approach to the scaling issue.
| Brian Murray (brian-murray) wrote : | # |
The table data is correct. I had to convert the portlet to a full page to get the query count so perhaps that has something to do with the quantity of queries?
| Abel Deuring (adeuring) wrote : | # |
Brian,
this is a _very_ useful improvement, I think!
> When a bug has a lot of duplicates and subscribers from duplicates
> it would be useful to know which duplicate you were subscribed to
> without checking every single duplicate bug to find out.
>
> Instead you can mouse over your name in the subscription and find
> out to which one you are subscribed.
>
> Test modified:
>
> bin/test -cvvt bugsubscription.txt xx-bug-
>
> I'd be happy to continue using the macro
> "bug/@@
> ideas on how to replace the title in it. I couldn't figure out a way
> to do that.
I think you replace the model class properties display_
display_
of the browser classes
lp.bugs.
and lp.bugs.
But the current variant is fine for me too.
> [Robert:]
>
> The table formatted awkwardly.
> Can you confirm:
> (dup subs, devel, old proposal, current proposal)
> (0, 24, 24, 25)
> (1, 26, 27, 26)
> (2, 28, 29, 28)
> (3, 29, 32, 29)
>
> This is certainly better. It appears to still scale with duplication
> subscriptions which is a problem. (And the query count is still quite
> large: for a portlet like this, 10-15 queries is what I'd expect).
>
> I haven't reviewed the code yet, but on the sheer performance size,
> these query counts (which are only a surrogate) are at least no-worse.
>
> If you want to grab an OCR to review this your friday, please do :
> don't block on me looking at the actual change - whomever reviews it
> can advise on the tastefulness of your approach to the scaling issue.
So we have one more query for zero duplicate subscribers, and the same
number of queries for one or more subscribers. I think this is fine.
Reducing the number of queries is something for another branch.
(pre-loading the subscriber and subscribed_by objects in the query
that retrieves the subscriptions comes to mind)

Two small points: have you checked the query impact of this? It looks
like it will do a lot of queries, to me.
Separately, have you considered just having the list of 'can
unsubscribe' things include separate actions for each bug.
e.g.
subscribers
teamfoo [-]
teamfoo (via 1234) [-]
teambar (via 3456) [-]
This would keep the unsubscribe actions in the same place (a good
thing), not make showing the list of dupes more expensive ( a good
thing) and leave the dup list cacheable if we choose to) (a good
thing)