Comment 1 for bug 327100

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

That page fetches all POFiles for the given DistroSeries with the given Language, unsliced, with a prejoin. It doesn't take the database very long to produce all those rows, but it's a safe bet that it does take a while for all those Python objects to come out the other end of the ORM.

Why isn't the query being sliced? Because DistroSeriesLanguage.po_files_or_dummies puts the cart before the horse. It gets all (yes, all) POFiles for the given DistroSeries in the given language, then goes through all templates for the DistroSeries to identify any DummyPOFiles it needs to create, and finally it produces the combined list for the entire DistroSeries—of which the BatchNavigator then renders just one batch. We need to make the batch navigator navigate the POTemplates, then fetch the POFiles and create DummyPOFiles for just the batch we're showing.

After that it's mostly queries to Person. Bundling all of those into a single "id IN (...)" would help.