Speed up TranslationGroup:+index

Bug #327575 reported by Jeroen T. Vermeulen
4
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Jeroen T. Vermeulen

Bug Description

The TranslationGroup:+index page for the Ubuntu translation group timed out on staging recently: OOPS-1136S365.

Simply too many little queries. Batch-fetching the Persons and Languages should fix it.

Related branches

Revision history for this message
Данило Шеган (danilo) wrote :

On that page we also list projects that are using the group, which there are a lot of for ubuntu-translators.

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

Danilo, you're right: after the gazillions of Person and Language come another oodillion little ProductLicense, LibraryFileAlias, and LibraryFileContent queries. Those look like they're from the projects list; the project icons are kept in the Librarian.

Changed in rosetta:
importance: Undecided → High
status: New → Triaged
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

We're still getting some of these, though mostly on Person queries:

OOPS-1521C1716, OOPS-1521C1889, OOPS-1521C676, OOPS-1521C76, OOPS-1521D1524
OOPS-1522EA675, OOPS-1522EA911, OOPS-1522EC670

Some of them still seem to happen on the Librarian references (which is odd if the icons are fetched in separate queries):

OOPS-1521D1560, OOPS-1521F858

Attaching a branch that deals with the Person ones.

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

OK, the Librarian stuff seems easy enough to explain: lib/canonical/launchpad/webapp/tales.py does a lot of "if context.icon is not None:" (for icon, mugshot, logo, and probably more). Which of course attempts to load context.icon into memory, and that isn't really necessary.

It may have a desirable "prefetching" effect. OTOH in cases where caches and proxies don't take care of the icon, it's better to incur a bit of back-to-back latency on filling in each icon than to keep the entire page from going to the client until all these latencies have already been incurred.

I'll treat that as a separate issue.

Changed in rosetta:
status: Triaged → Fix Committed
assignee: nobody → Jeroen T. Vermeulen (jtv)
milestone: none → 10.03
tags: added: qa-needstesting
Revision history for this message
Ursula Junque (ursinha) wrote : Bug fixed by a commit
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.