From be9f54d0a9d8084545903559f81d52f705f4f699 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sun, 24 Nov 2019 14:36:36 +0100 Subject: [PATCH] set default osm2pgsql to 0 when using flatnode file --- lib/setup/SetupClass.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/setup/SetupClass.php b/lib/setup/SetupClass.php index 2fdb3926..12a1bb0d 100755 --- a/lib/setup/SetupClass.php +++ b/lib/setup/SetupClass.php @@ -29,10 +29,13 @@ class SetupFunctions warn('resetting threads to '.$this->iInstances); } - // Assume we can steal all the cache memory in the box (unless told otherwise) if (isset($aCMDResult['osm2pgsql-cache'])) { $this->iCacheMemory = $aCMDResult['osm2pgsql-cache']; + } elseif (!is_null(CONST_Osm2pgsql_Flatnode_File)) { + // When flatnode files are enabled then disable cache per default. + $this->iCacheMemory = 0; } else { + // Otherwise: Assume we can steal all the cache memory in the box. $this->iCacheMemory = getCacheMemoryMB(); }