Code review comment for lp:~jtv/launchpad/bug-458049

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

= Bug 458049 =

Memory usage is the bane of the message-sharing migration script. In a previous fix I stopped it from retrieving POMsgID objects, since only their object ids were needed for comparison. But as it turns out, the msgids were still being loaded from the database because of an implicit prejoin in POTemplate.getPOTMsgSets.

So I'm making that prejoin optional. It's still the default behaviour, but the script disables it.

This may conceivably make the counting of potmsgsets in a template slightly faster as well, as it has no need for the additional left joins. The database backend may know that too, but why put it to the trouble?

A new test tries to ensure that migration really does not suck any POMsgID objects into memory:
{{{
./bin/test -vv -t SharingMigrationPerformance
}}}

For Q/A, try running this script:

  https://pastebin.canonical.com/23602/

*If* this change really helps, that test *may* not bring the staging server to its knees by consuming over 2.5 GB of address space.

Jeroen

« Back to merge proposal