Timeouts on DistroSeries:+templates page

Bug #608349 reported by Данило Шеган
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Jeroen T. Vermeulen

Bug Description

After we've fixed the "obvious" problems in bug #475435 with the page like
  https://translations.edge.launchpad.net/ubuntu/lucid/+templates
we are still getting timeouts. Good news is that the page sometimes loads, and we still have a few ideas on how we can improve it further.

Database is not a problem anymore, and we've reduced the time it takes to render it by removing repeated use of fmt:url in TAL and also got rid of the menu navigation for getting sub-pages which turned out to be *really* slow.

We are still doing a single fmt:url for each of the templates (every single row), and we can instead do string composition to construct URLs instead. The complication there is that each of the templates lives in a different sourcepackage, but that shouldn't be too hard to get. If that doesn't help, we can investigate using different TAL rendering libraries (like Chameleon, something Gary said we'll explore), and ultimately, fall back to batching.

What we should try first is doing just the simple string composition for URLs. In our tests that got the rendering time to a stable ~6s (which is still too much).

The new profiling stuff (see https://lists.launchpad.net/launchpad-dev/msg03813.html) should be interesting to figure out exactly where the time is spent as well.

OOPS-1663ED2431 OOPS-1663EB2356 OOPS-1663EC2210

Related branches

Revision history for this message
Adi Roiban (adiroiban) wrote :

Do we still get timeouts on +templates, for project other than Ubuntu?

I guess that the previous fix is still a big improvement for all other projects, except Ubuntu.

Even with a faster TAL rendered, I think that we still need pagination for more than 300 templates.

Loading a page with more than 1000 templates, brings Chromium to his knees.

I will try to use Maris tips for generating a profile for +templates page.

Adi Roiban (adiroiban)
Changed in rosetta:
assignee: nobody → Adi Roiban (adiroiban)
Revision history for this message
Robert Collins (lifeless) wrote :

Hi, just to now that this page is a high contender for 'soft oops' status at the moment. https://devpad.canonical.com/~stub/ppr/lpnet/latest-daily-timeout-candidates.html shows it taking 14 seconds to render some of the time - and this is above our target timeout figure, so this page is likely to go boom when we change that.

Changed in rosetta:
assignee: Adi Roiban (adiroiban) → Jeroen T. Vermeulen (jtv)
milestone: none → 10.10
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

I've landed a branch that gave me a 2×—3× speedup on my local system, rendering 2K templates in 2 seconds. It moves all the rendering of a table row to the browser code. It still leaves some obvious opportunities untapped:

 * The view could pre-render a table row at initialization time, caching the HTML for an entire row as a string (with %s interpolation to insert the per-row details).

 * I tested on templates without headers. If de-serializing real-world POTemplates costs too much, then as Danilo has already suggested, we can query just the fields we need: iscurrent, name, priority, messagecount, last-update date, and for distro listings, sourcepackagename.name.

Revision history for this message
Launchpad QA Bot (lpqabot) wrote : Bug fixed by a commit
tags: added: qa-needstesting
Changed in rosetta:
status: Triaged → Fix Committed
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

Edge just rendered the Lucid templates list (just over 2K templates) in about 2—2.5 seconds. That's going by the HTML comment at the bottom of the page.

tags: added: qa-ok
removed: qa-needstesting
Changed in rosetta:
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.