File size: 12,808 Bytes
4aa5fce |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
[12:29] <gary_poster> bac benji danilos gmb: call in 1 [12:29] <danilos> ack [12:30] <gmb> ok [12:41] * benji goes to the utility drawer to find a nine volt battery to satiate this chirping smoke detector. [12:45] <benji> much better [13:37] <gary_poster> gmb, do you have time to throw a drowning man a line? via Skype? :-) [13:40] <gmb> gary_poster: Can you give me 10 minutes to just grab a drink? [13:40] <gary_poster> sure gmb :-) [13:40] <gmb> gary_poster: Cool. I'll ping you shortly. [13:40] <gary_poster> thank you [13:49] <gmb> gary_poster: Ready when you are [13:53] <bac> hi benji -- you free to chat? i've been looking for good ways to screen share, etc but have nothing [13:53] <benji> sure [13:55] <gary_poster> gmb, sorry, missed that. calling... [13:56] <bac> benji: skype? [13:56] <benji> sounds good [13:58] <bac> benji: bin/test -vvt test_mark_duplicate_query [13:59] <bac> bin/test -vvt test_mark_as_duplicate_query [14:02] <bac> bin/test -vvt test_mark_duplicate_query_count [14:33] <bac> benji: pushed fixes to lp:~bac/launchpad/bug-813322-2 [14:34] <bac> benji: and the correct failing test is: bin/test -vvt test_mark_as_duplicate_query_count [14:35] <benji> bac: looking now [15:00] <gary_poster> gmb, someone added something in the template that disables the expander if there are more than 10 bugtasks. The fields are still calculated, and rendered, but the expander is not drawn. That could be an easy thing to change. But... [15:00] <gary_poster> what do you do if you actually need to change something for a bugtask in that collection? Doesn't that seem like a broken behavior--or is there a workaround? [15:00] <gary_poster> It strikes me that I could improve this by doing the "draw the form on demand" after all. [15:01] <gary_poster> That would make the big story more functional, and the small and big story faster [15:01] <gary_poster> CHR === Ursinha` is now known as Ursinha === Ursinha is now known as Guest8410 === Guest8410 is now known as Ursula === Ursula is now known as Ursinha [15:13] <gary_poster> And CHR is done! Happy day. [15:17] <gmb> gary_poster: Sorry, completely missed the fact that Colloquy had disconnected... [15:18] * gmb reads backscroll [15:18] <gary_poster> :-) np [15:20] <gmb> gary_poster: Well, bug 1 is an example of this (I was wondering why the expanders went away; this explains it). If you click on any of the edit icons on the bug 1 bugtasks table you get redirected to the bugtask:+editstatus page. (i.e. exactly what used to happen before the expanders). [15:20] <_mup_> Bug #1: Microsoft has a majority market share <iso-testing> <ubuntu> <Clubdistro:Confirmed> <Computer Science Ubuntu:Confirmed for compscibuntu-bugs> <dylan.NET.Reflection:Invalid> <dylan.NET:Invalid> <EasyPeasy Overview:Invalid by ramvi> <GenOS:In Progress by gen-os> <GNOME Screensaver:Won't Fix> <Ichthux:Invalid by raphink> <JAK LINUX:Invalid> <LibreOffice:In Progress by bjoern-michaelsen> <Linux Mint:In Progress> <The Linux OS Project:In [15:20] <_mup_> Bug #1: Microsoft has a majority market share <iso-testing> <ubuntu> <Clubdistro:Confirmed> <Computer Science Ubuntu:Confirmed for compscibuntu-bugs> <dylan.NET.Reflection:Invalid> <dylan.NET:Invalid> <EasyPeasy Overview:Invalid by ramvi> <GenOS:In Progress by gen-os> <GNOME Screensaver:Won't Fix> <Ichthux:Invalid by raphink> <JAK LINUX:Invalid> <LibreOffice:In Progress by bjoern-michaelsen> <Linux Mint:In Progress> <The Linux OS Project:In [15:20] <gmb> gary_poster: So essentially we degrade nicely already. Changing things so that all the unnecessary work isn't done shouldn't break anything, I expect. [15:22] <gary_poster> gmb, ok so keep current behavior but don't do unnecessary Python work. cool [15:22] <gmb> gary_poster: Indeed. And we can then (probably) punt on the "Make it nicer and then faster" work if we want to. [15:22] <gary_poster> right gmb. That sounds like a win for everything except the future :-) [15:23] <gmb> gary_poster: Indeed. And if the future involves the Yellow squad we may yet regret it :) [15:23] <gary_poster> heh [15:23] <gary_poster> cross that bridge then and all that :-) [15:23] <gary_poster> ok I'll see if I can pull this off... [15:23] <gmb> Righto. [15:24] <gmb> gary_poster: Ping me if you need to pull at any weird threads on that code. [15:24] <benji> bac: I've found that just under 90% of the queries are generated by eight or nine repetitions of very similar sets of queries over and over [15:24] <gary_poster> cool thanks gmb [15:24] <bac> benji: skype? [15:26] <benji> bac: http://paste.ubuntu.com/662731/ [15:44] <gary_poster> gmb, one-line change makes code go from 6 seconds to 2 ;-) [15:44] <gmb> Sweet. [15:44] <gmb> gary_poster: Want me to review it? [15:45] <gmb> Or are you going to do Other Clever Things. [15:45] <gmb> ? [15:46] <gary_poster> gmb, yeah thanks. Lemme see if I get this up quickly--I have stuff I need to clean up. No, I intend to run away at the mention of Clever Things--or at least walk on a treadmill at a stately pace. [15:47] <gmb> Very wise. [15:53] <benji> bac: it looks like the repeats aren't identical, but they only vary by bug ID [15:55] <bac> benji: actually i see a lot of *identical* queries [15:55] <bac> let me paste [15:56] <benji> bac: are you logging the statement only or the parameters too, there are only about two dozen unique queries, but the parameters vary [15:58] <bac> benji: http://pastebin.ubuntu.com/662767/plain/ -- the numeric prefix is the number of times the query was seen [16:00] <bac> benji: i'm stepping out to get a bite to eat. [16:00] <benji> that is a lot of dupes; I'm dissapointed that there isn't some sort of caching scheme that keeps those from happening [16:00] <benji> k, I'm going to do the same in a while [16:00] <bac> benji: would love to talk to you about how we can accomplish that... [16:00] <benji> on the other hand, even if we got rid of all the dupes, that would still be 258 queries [16:11] <gary_poster> that number is not unheard of [16:16] <benji> bac: (for when you get back), the call to Snapshot on line 1834 is responsible for 7 queries for each duplicate and the next line generates 3 more, so that's 10 queries per duplicate right there [16:16] <benji> that's in lib/lp/bugs/model/bug.py [16:19] <benji> wow, then the subscribers that are fired on the notify(event) line trigger 31 more queries (per duplicate bug) [16:22] <gary_poster> gmb, https://code.launchpad.net/~gary/launchpad/bug724025/+merge/71076 when you are ready. I ended up implementing it with a view function rather than a one-line template change so I could add comments and such, but it is still pretty short. [16:22] <gmb> gary_poster: Righto, looking now. [16:22] <gary_poster> thank you [16:24] <gmb> gary_poster: Good stuff. Approved. [16:25] <gmb> \0/ DebBugs works again! [16:25] <gmb> Let joy be unconfined. [16:25] <gary_poster> :-) thanks gmb [16:25] <gmb> np [16:28] <gary_poster> lunch, and a bank visit, in triumph ;-) [17:27] <bac> benji: interesting [17:33] <benji> bac: if I skip creating the snapshot and firing the event (either of which may not be practicle) the test is down to 55 queries, of which 22 are updating bug heat [17:34] <benji> one thought would be to defer firing the object modified event until email sending time (or if we have a reasonable way to create jobs, queue up a job for it) [17:35] <benji> brb/caffeine [17:36] <bac> but the notify is what populates the database for the cronjob to later chew on [17:39] <benji> bac: I haven't looked at the subscriber, but I doubt it's very complicated, right? We could either just have a function that we call that records the fact that we need to fire the duplication event and that the email should be sent (or they could be two different flags, preferably) or we could fire a new event that has a subscriber that does what the aformentioned function would do [17:41] <benji> this is starting to get into the pattern of "if you know their request will succeed, just record the fact that the user asked for X and tell them it worked and then do X ASAP, but out of band with the web server" [17:41] <benji> which is a good pattern, but not one that we do much of, as far as I am aware [17:44] <bac> benji: the event -> db -> action chain is pretty convoluted. i'm not convinced the even mechanism really buys us much. but, in order to avoid db changes, i worked within that framework [17:44] <bac> benji: perhaps that was a bad decision [17:45] <bac> if you look at the diff of my branch it'll be clear the work that was done to close the loop. it was pretty minimal [17:45] <benji> it's conservative to fire an object modified event when you modify an object, but if none of the subscribers care (and we're not too worried about introducing subscribers that do care in the future) then we can skip that part [18:07] <bac> benji: but we do care, as the subscriber is the one who stuffs the deferred bug notification into the db [18:09] <benji> bac: right, but that's "our" subscriber, we can just call that code directly (no need for a subscriber) because we know we need it to happen now, the other subscribers may be less important (but I bet we still want them to run eventually) [18:09] <benji> I'm investigating other things, but a deferred execution model seems to fit this really well. [19:21] <bac> darn, benji is gone [19:21] <bac> well, gary_poster, i'll brag to you [19:21] <gary_poster> I like bragging! go for it! [19:21] <bac> based on benji's suggestion i removed the Snapshot and the use of the event model [19:21] <bac> queries down from 467 to 91 [19:22] <gary_poster> hah! wow! [19:22] <gary_poster> and things still work, I take it? ;-) [19:22] <bac> not sure it *works* but that's a detail [19:22] <gary_poster> lol [19:23] <gary_poster> bac, but I assume the basics work of what you were doing before, so sounds very good so far :-) [19:24] <bac> yeah, i hope so [19:24] <bac> i'll verify it works now [19:24] <gary_poster> cool, lemme know [19:24] <bac> i think Snapshot may be possessed [19:30] <gary_poster> oooweeeeeeeoooooo [19:30] <benji> daylight come and me wan' go home [19:31] <bac> reposting [19:31] <bac> based on benji's suggestion i removed the Snapshot and the use of the event model [19:31] <bac> 15:21 [19:31] <bac> queries down from 467 to 91 [19:31] <benji> Good news everyone: routers work better with electricity. [19:31] <gary_poster> lol [19:31] <benji> bac: cool! [19:33] <gary_poster> benji, bac hasn't said whether it actually works yet though. He has another branch in which he has deleted the code tree and the query count has dropped even more. [19:33] <benji> bac: while sitting in the twighlight of my unpowered home I dug into the subscribers some more, the main culprit is add_bug_change_notifications [19:33] <benji> heh [19:34] <bac> yes, i determined postgres is the root of our problem [19:34] <gary_poster> heh [19:34] <benji> heh [19:34] <bac> are either of you getting the smoke from the dismal swamp fire? [19:34] <benji> I can tell you that ZODB doesn't have these problems. It has *other* problems, but not these. [19:35] <gary_poster> :-) [19:35] <benji> I haven't been outside since my morning bike ride and I didn't notice any then. [19:36] <gary_poster> no smoke for me [19:36] <benji> "Great Dismal Swamp" is the perfect name for a swamp [19:36] <gary_poster> next to the Really Big Mountain. [19:36] <benji> lol [19:36] <benji> which overlooks The Especially Wet Lake [19:37] <gary_poster> lol, very nice [19:37] <benji> these seem like place names from The Princess Bride [19:43] <benji> the more I look at this, the more I think it's crying out for an async approach; we shoudl be doing all this work to figure out what changed and who cares after the actual request has finished [19:44] <gary_poster> that's what bac is working towards, in the small [19:44] <benji> hmm, or a long-poll type thing, but we'd still run afoul of the timeout [19:45] <bac> yep [19:45] <benji> if we had a simple and reliable way to schedule work for later, I suspect we could fix lots of timeouts and otherwise slow pages with this particular hammer [19:45] <gary_poster> The job system is the chosen hammer [19:46] <gary_poster> I don't hink it is super simple [19:46] <gary_poster> it's fairly reliable [20:02] * bac -> chr [20:09] <bac> gary_poster, benji: my changes *appear* to work when exercised via lp.dev. proper tests are now the focus. [20:09] <benji> cool [20:10] <bac> benji: did you do chr? there was practically nothing there [20:10] <benji> bac: nope, my power was out at the time and then I forgot [20:10] <benji> I'm glad there wasn't a backlog [20:13] <gary_poster> cool [20:17] <bac> i am releasing myself on my own recognizance. be back later. [20:32] <gary_poster> doesn't sound safe to me. |