From: Bryan Date: Tue, 14 Jan 2014 08:45:36 +0000 (-0500) Subject: decreased memory footprint X-Git-Tag: release-20150131~240^2~8 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d3e4c5711b0be385e83c75b9950c1fe37b83cbc0;p=oweals%2Fkarmaworld.git decreased memory footprint --- diff --git a/karmaworld/apps/notes/management/commands/populate_indexden.py b/karmaworld/apps/notes/management/commands/populate_indexden.py index d80106c..2ce3835 100644 --- a/karmaworld/apps/notes/management/commands/populate_indexden.py +++ b/karmaworld/apps/notes/management/commands/populate_indexden.py @@ -14,9 +14,7 @@ class Command(BaseCommand): "in the index that are not overwritten will still be around." def handle(self, *args, **kwargs): - notes = Note.objects.all() - - for note in notes: + for note in Note.object.iterator(): try: print "Indexing {n}".format(n=note) add_document(note)