From: Bryan Date: Tue, 14 Jan 2014 08:45:36 +0000 (-0500) Subject: decreased memory footprint X-Git-Tag: release-20150131~251 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d2c7882a4b0d12317ca3a449db25f74e66321177;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)