From d2c7882a4b0d12317ca3a449db25f74e66321177 Mon Sep 17 00:00:00 2001 From: Bryan Date: Tue, 14 Jan 2014 03:45:36 -0500 Subject: [PATCH] decreased memory footprint --- .../apps/notes/management/commands/populate_indexden.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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) -- 2.25.1