mozilla/kuma — pull request #91 by lmorchard (2012-01-19 18:20:02+00:00)
Title: Reset retained DB queries between documents to flatten memory usage

Before this change, the migration command would steadily consume memory until the system killed it. Now, I've been able to run it for 30 min on my VM without memory consumption rising above 505MB. No need for hacks that run the script on a chunk of documents and then restarts it to reclaim memory.