Comment 1 for bug 515702

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote : Re: Distribution/DistroSeries overview wastes time querying languges and countries

The cause seems to be that isPreferredLanguage indirectly looks up TranslationsMixin.translatable_languages, which uses preferred_or_request_languages from the Launchpad helpers, which in turn queries all of the languages set as the user's preferred languages or accepted by the http[s] request.

Since this is browser code, we can just make translatable_languages a @cachedproperty. It doesn't break any pagetests, and it looks like it'd knock >10 seconds off each of the timed-out requests.