/srv/irclogs.ubuntu.com/2011/07/21/#launchpad-yellow.txt

=== _mup__ is now known as _mup_
danilosbac, hi, I've added a comment to the MP for bug 799001 about how you can easily go about extending the existing framework to perform well, it's just some lovely storm magic to return tuples where appropriate11:45
_mup_Bug #799001: gnome-panel crashed with SIGSEGV in gtk_widget_pop_verify_invariants() <apport-crash> <i386> <oneiric> <GNOME Panel:New> <gnome-panel (Ubuntu):Triaged> < https://launchpad.net/bugs/799001 >11:45
danilosuhm, make that bug 79990111:54
_mup_Bug #799901: "subscribed by" omitted from the title of links in subscriber list <regression> <story-better-bug-notification> <Launchpad itself:In Progress by bac> < https://launchpad.net/bugs/799901 >11:54
bacdanilos: cool, thanks12:06
bacdanilos: making that part more efficient will be great.  but i wonder if it is really a problem.  this is the same method used before and it wasn't causing time outs afaik12:07
danilosbac, well, we were not doing person look-ups other than those in the one big query, and those tend to be the slowest12:23
gary_posterbac benji danilos gmb: skype in 212:28
bacok12:29
=== Ursinha` is now known as Ursinha
=== Ursinha is now known as Guest44940
=== Guest44940 is now known as Ursinha_
benjigary_poster: do you know anything about how storm caches objects that it has loaded from a DB?13:41
gary_posterbenji, I did art one point :-P13:42
gary_posterbenji, danilos will probably have it more available on the tip of his brain, but you can try me too13:43
benjithis is all I found documentation wise, and it's a bit thin: https://storm.canonical.com/Tutorial#Caching%20behavior13:43
benjiI think I can make my branch perform reasonably if I can just get Storm to stop making the same queries over and over.13:44
=== Ursinha_ is now known as Ursinha
gary_posterI see. It's a simple cache.  object id -> object IIRC13:44
gary_posterthat means that it is not super helpful for mass queries IME13:45
danilosbenji, you can basically just do something like list(store.find()) to bring objects in cache13:45
gary_posterbenji, there are patterns for this stuff that lifeless has pioneered...13:46
gary_posterdanilos is the man.  he will help you :-P13:46
benjigary_poster: do you know where any of those patterns have been documented or crystallized?13:46
danilosbenji, however, the page you are touching is mostly getting all the data with one query13:46
gary_posterbenji, person.py is what I was thinking of13:47
benjidanilos: I'm confused because I see the same queries being executed (some times back to back)13:47
benjigary_poster: thanks13:47
* gary_poster looks for details, though he suspects danilos will get him on right track faster13:47
danilosbenji, they could be, but the main query fetching all templates and relevant details is a single query for all however many templates there are13:48
danilosbenji, basically, side-queries on the page are not optimized, but the big one is13:49
gary_posterbenji, I was thinking of getPrecachedPersonsFromIDs13:49
gary_posterit might be the kind of thing you need13:49
benjidanilos: can you proffer a reason why I'd see the same query executed twice back to back?13:49
benjigary_poster: thanks, I'll look at that13:50
danilosbenji, which query is it? perhaps a .count() and then the query13:50
gary_posterbecause it sounds like you have a single query that gets you the data you want, but then you need to get a bunch of objects on the basis of that query13:50
benjidanilos: here's an example of one that is executed twice, back to back: http://paste.ubuntu.com/649123/13:51
danilosbenji, important thing is that the number of queries is close to constant and that it doesn't scale with the number of objects being fetched; sometimes the code might be doing a few queries as opposed to one (I don't remember exact details for this page)13:51
danilosbenji, that query seems to not be needed for the page as it was before (that's for determining links between packages and projects, to "link" the sharing templates)13:52
benjidanilos: my branch intoduces that query13:52
benjimy increasted query count is roughly linear with the number of rows in the result, so not good13:53
danilosbenji, right13:53
danilosbenji, basically, it'd be good to move this query into the big query as a join13:54
benjidanilos: is "the big query" the potemplateset.getSubset call in iter_templates?  That's the only place I see data being gathered, but it doesn't look much like a query.13:56
danilosbenji, could be the TemplatesCollection stuff which wraps queries with a collection pattern13:56
danilosbenji, let me take a look13:56
benjidanilos: it's a POTemplateSubset object13:57
danilosbenji, right, it'd probably be good to switch it to the TranslationTemplatesCollection which'd work nicer and would be much easier to extend (considering it's storm-based instead of manual query construction)14:04
benjidanilos: ok, let me take a stab at that14:04
danilosbenji, I'd keep that as a branch dependent on the one you already have because you have something that works already I believe :)14:05
benjidanilos: I don't follow.  I intended to start a new branch from devel, refactor the existing code to use TranslationTemplatesCollection and once I got that working add my new functionality on top.14:06
danilosbenji, if you look at model/hastranslationtemplates.py (and interface), that's what all of productseries/distroseries/sourcepackage should implement already14:06
danilosbenji, that's fine as well :)14:06
danilosbenji, fwiw, this refactoring works for me: https://pastebin.canonical.com/50060/14:10
benjidanilos: cool, thanks14:10
danilosbenji, np, I just wanted to confirm it myself; how to get more data easily is shown in other methods of HasTranslationTemplates14:12
benjik14:13
danilosgary_poster, btw, I haven't had any food, and I wonder if we can either have an early call so I can go fetch some food after that or if we can delay it a bit so I go fetch the food now? :)14:13
gary_posterdanilos, heh, either way, but I vote for you getting food first.  No one wants to face a hungry danilos alone.14:14
daniloshaha, ok, fair enough, I'll ping when I am back and well fed then :)14:14
gary_poster:-) ok cool14:14
danilosgary_poster, ok, back14:47
gary_posterdanilos, k, lemme get my notes...14:47
gary_posterdanilos, ready.  gimme a call when you are14:48
baci see lp2kanban is ignoring bug 788685 -- i wonder if it is confused by all the different bug tasks15:16
_mup_Bug #788685: Enable translating selected Ubuntu universe packages in Launchpad <escalated> <oem-services> <Launchpad itself:In Progress by bac> <OEM Priority Project:Invalid> <Ubuntu Translations:Triaged> <pkgbinarymangler (Ubuntu):Fix Released by pitti> < https://launchpad.net/bugs/788685 >15:16
benjiaway15:20
benji...for lunch15:20
gary_posterbac, yeah15:21
gary_posterI made a card with that guess in Tasks15:21
gary_posterred one15:21
gary_posterwe've had another one like it15:21
bacdidn't see that15:21
danilosyay, good news, my apartment seems flooded, heading home :/15:21
gary_poster!!! :-(15:22
gary_postergood luck15:22
danilo_just to report back: nothing too bad, only the bathroom slightly flooded, but water noticed by the floor-below neighbours who nicely phoned me at the sight of first drops15:56
danilo_(water probably going by the heating/water pipes)15:56
benjiI'm glad it's not too bad.  I know from personal experience how bad that can be.16:05
gary_posterI'm glad danilo16:07
gary_posterlunxh16:18
gary_posterlunch16:18
bacgary_poster: chat?18:30
gary_posterbac, sure18:31
gary_posterbenji, gimme a call when you are ready20:00
benjicalling20:00

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!