=== _mup__ is now known as _mup_ [11:45] bac, 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 appropriate [11:45] <_mup_> Bug #799001: gnome-panel crashed with SIGSEGV in gtk_widget_pop_verify_invariants() < https://launchpad.net/bugs/799001 > [11:54] uhm, make that bug 799901 [11:54] <_mup_> Bug #799901: "subscribed by" omitted from the title of links in subscriber list < https://launchpad.net/bugs/799901 > [12:06] danilos: cool, thanks [12:07] danilos: 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 afaik [12:23] bac, well, we were not doing person look-ups other than those in the one big query, and those tend to be the slowest [12:28] bac benji danilos gmb: skype in 2 [12:29] ok === Ursinha` is now known as Ursinha === Ursinha is now known as Guest44940 === Guest44940 is now known as Ursinha_ [13:41] gary_poster: do you know anything about how storm caches objects that it has loaded from a DB? [13:42] benji, I did art one point :-P [13:43] benji, danilos will probably have it more available on the tip of his brain, but you can try me too [13:43] this is all I found documentation wise, and it's a bit thin: https://storm.canonical.com/Tutorial#Caching%20behavior [13:44] I think I can make my branch perform reasonably if I can just get Storm to stop making the same queries over and over. === Ursinha_ is now known as Ursinha [13:44] I see. It's a simple cache. object id -> object IIRC [13:45] that means that it is not super helpful for mass queries IME [13:45] benji, you can basically just do something like list(store.find()) to bring objects in cache [13:46] benji, there are patterns for this stuff that lifeless has pioneered... [13:46] danilos is the man. he will help you :-P [13:46] gary_poster: do you know where any of those patterns have been documented or crystallized? [13:46] benji, however, the page you are touching is mostly getting all the data with one query [13:47] benji, person.py is what I was thinking of [13:47] danilos: I'm confused because I see the same queries being executed (some times back to back) [13:47] gary_poster: thanks [13:47] * gary_poster looks for details, though he suspects danilos will get him on right track faster [13:48] benji, they could be, but the main query fetching all templates and relevant details is a single query for all however many templates there are [13:49] benji, basically, side-queries on the page are not optimized, but the big one is [13:49] benji, I was thinking of getPrecachedPersonsFromIDs [13:49] it might be the kind of thing you need [13:49] danilos: can you proffer a reason why I'd see the same query executed twice back to back? [13:50] gary_poster: thanks, I'll look at that [13:50] benji, which query is it? perhaps a .count() and then the query [13:50] because 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 query [13:51] danilos: here's an example of one that is executed twice, back to back: http://paste.ubuntu.com/649123/ [13:51] benji, 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:52] benji, 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] danilos: my branch intoduces that query [13:53] my increasted query count is roughly linear with the number of rows in the result, so not good [13:53] benji, right [13:54] benji, basically, it'd be good to move this query into the big query as a join [13:56] danilos: 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] benji, could be the TemplatesCollection stuff which wraps queries with a collection pattern [13:56] benji, let me take a look [13:57] danilos: it's a POTemplateSubset object [14:04] benji, 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] danilos: ok, let me take a stab at that [14:05] benji, I'd keep that as a branch dependent on the one you already have because you have something that works already I believe :) [14:06] danilos: 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] benji, if you look at model/hastranslationtemplates.py (and interface), that's what all of productseries/distroseries/sourcepackage should implement already [14:06] benji, that's fine as well :) [14:10] benji, fwiw, this refactoring works for me: https://pastebin.canonical.com/50060/ [14:10] danilos: cool, thanks [14:12] benji, np, I just wanted to confirm it myself; how to get more data easily is shown in other methods of HasTranslationTemplates [14:13] k [14:13] gary_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:14] danilos, heh, either way, but I vote for you getting food first. No one wants to face a hungry danilos alone. [14:14] haha, ok, fair enough, I'll ping when I am back and well fed then :) [14:14] :-) ok cool [14:47] gary_poster, ok, back [14:47] danilos, k, lemme get my notes... [14:48] danilos, ready. gimme a call when you are [15:16] i see lp2kanban is ignoring bug 788685 -- i wonder if it is confused by all the different bug tasks [15:16] <_mup_> Bug #788685: Enable translating selected Ubuntu universe packages in Launchpad < https://launchpad.net/bugs/788685 > [15:20] away [15:20] ...for lunch [15:21] bac, yeah [15:21] I made a card with that guess in Tasks [15:21] red one [15:21] we've had another one like it [15:21] didn't see that [15:21] yay, good news, my apartment seems flooded, heading home :/ [15:22] !!! :-( [15:22] good luck [15:56] 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 drops [15:56] (water probably going by the heating/water pipes) [16:05] I'm glad it's not too bad. I know from personal experience how bad that can be. [16:07] I'm glad danilo [16:18] lunxh [16:18] lunch [18:30] gary_poster: chat? [18:31] bac, sure [20:00] benji, gimme a call when you are ready [20:00] calling