Comment 4 for bug 684664

Revision history for this message
William Grant (wgrant) wrote :

Query counts seem to be roughly sensibly scaling by template, except for one thing. There are hundreds of calls per template like this, each executing a (reasonably quick) query.

0-2@SQL-main-master
           SELECT DISTINCT POTemplate.source_file_format
             FROM TranslationTemplateItem
                  JOIN POTemplate
                    ON POTemplate.id = TranslationTemplateItem.potemplate
             WHERE TranslationTemplateItem.potmsgset = 7754677

[...]
  File "/srv/launchpad.net/codelines/trunk/lib/lp/translations/model/pofile.py", line 1662, in __init__
    self.messages = self._getMessages()
  File "/srv/launchpad.net/codelines/trunk/lib/lp/translations/model/pofile.py", line 1794, in _getMessages
    msgset.singular_text = row.potmsgset.singular_text
  File "/srv/launchpad.net/codelines/trunk/lib/lp/translations/model/potmsgset.py", line 241, in singular_text
    if self.uses_english_msgids:
  File "/srv/launchpad.net/codelines/trunk/lib/lp/translations/model/potmsgset.py", line 216, in uses_english_msgids
    self._conflictsExistingSourceFileFormats())
  File "/srv/launchpad.net/codelines/trunk/lib/lp/translations/model/potmsgset.py", line 187, in _conflictsExistingSourceFileFormats
    cur.execute(query)
[...]