Major page render time regression in 3.0-dev for many-bugtask bugs

Bug #430288 reported by Max Bowsher
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Gavin Panella

Bug Description

Compare the page render time (load times are roughly similar) for a bug with many bugtasks - e.g. bug 427356 - on lpnet vs. edge.

Major regression.

Also, firefox goes unresponsive and chewing 100% CPU for a long time whilst loading the edge page.

Tags: lp-bugs

Related branches

Revision history for this message
Deryck Hodge (deryck) wrote :

Gavin will take a look today to determine the cause and impact -- i.e. if we have a 3.0 UI issue at work here, or a variety of problems.

Changed in malone:
assignee: nobody → Gavin Panella (allenap)
importance: Undecided → High
status: New → Triaged
Revision history for this message
Eleanor Berger (intellectronica) wrote :

It seems unlikely that this is a 3.0 UI issue, since this page has not yet been converted. If the performance difference is consistent, it could be any landing in the last two months. The most significant change that may involve more queries is the addition of more AJAX controls, some of them require extra data for the initialization.

Revision history for this message
Gavin Panella (allenap) wrote :

Confirmed in FF 3.5 and Chromium, both on Ubuntu.

Changed in malone:
assignee: Gavin Panella (allenap) → nobody
milestone: none → 3.0
assignee: nobody → Gavin Panella (allenap)
Revision history for this message
Gavin Panella (allenap) wrote :

The problem seems to be in setup_bugtask_row(). I haven't isolated what exactly, but disabling that function makes everything work fine again.

Revision history for this message
Gavin Panella (allenap) wrote :

I think I've narrowed it down to Y.lp.picker.addPickerPatcher().

Gavin Panella (allenap)
summary: - Major page load time regression in 3.0-dev for many-bugtask bugs
+ Major page render time regression in 3.0-dev for many-bugtask bugs
description: updated
Revision history for this message
Gavin Panella (allenap) wrote :

The following diff prevents the page from stalling towards the end of
the load/render process. There's a lot more code in the function
that's being returned from, but the line that's commented out below is
able to cause a stall all on its own (at least, for me, on FF 3.5,
Ubuntu 9.04).

Of course, we can't land this. It's only an avenue for exploration
tomorrow.

--- lib/canonical/launchpad/javascript/lp/picker.js 2009-08-26 15:51:46 +0000
+++ lib/canonical/launchpad/javascript/lp/picker.js 2009-09-16 16:59:27 +0000
@@ -144,7 +144,8 @@
         });
     };

- var picker = Y.lp.picker.create(vocabulary, save, config);
+ //var picker = Y.lp.picker.create(vocabulary, save, config);
+ return;
     picker._resource_uri = resource_uri;
     var extra_buttons = Y.Node.create(
         '<div style="text-align: center; height: 3em; ' +

Revision history for this message
Gavin Panella (allenap) wrote :

Have done some more debugging, and it seems that there isn't a single
culprit. The picker code (as mentioned in the last comment) is
certainly partly to blame, but Firefox has stopped the script in
importance_choice_edit.render() too, in <widget>.syncUI(). I think
that the overhead of rendering so many widgets in the page - all of
them in Y.on('load') - means that the browser stalls for a long time.

Additionally, as these widgets are being rendered, FF needs to do
layout on the bugtask table again. For me, it tries to do this as the
script runs, rather than waiting until the end; this is probably quite
a big overhead. I will investigate to see if there are any ways to
prevent layout while the onload code runs.

Also, using a shared "Y" object doesn't seem to make a big difference
so far.

Revision history for this message
Gavin Panella (allenap) wrote :

Actually, the bit about doing layout while the script runs appears to
not be the case.

Deryck Hodge (deryck)
Changed in malone:
status: Triaged → In Progress
Revision history for this message
Diogo Matsubara (matsubara) wrote : Bug fixed by a commit
Changed in malone:
status: In Progress → Fix Committed
Gavin Panella (allenap)
Changed in malone:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.