From 5ef2a785fdd268e7a3eb67f654ac65065f307b65 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Fri, 25 Nov 2011 22:22:32 -0500 Subject: [PATCH] added comment explaining the use of a separate pool --- overviewer_core/rendernode.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/overviewer_core/rendernode.py b/overviewer_core/rendernode.py index 91449f5..f4c2f67 100644 --- a/overviewer_core/rendernode.py +++ b/overviewer_core/rendernode.py @@ -389,6 +389,14 @@ class RenderNode(object): numqtrees = len(self.quadtrees) procs = min(procs, numqtrees) + # Create a private pool to do the chunk scanning. I purposfully don't + # use the same pool as the rendering. The process of chunk scanning + # seems to take a lot of memory. Even though the final tree only takes + # a few megabytes at most, I suspect memory fragmentation causes the + # process to take much more memory than that during the scanning + # process. Since we use a private pool just for this purpose, the trees + # are piped back to the master process and the fragmented + # memory-hogging processes exit, returning that extra memory to the OS. if procs == 1: pool = FakePool() else: