From c47a583f43dd3d339747bdab9ef59d4ffc5dd0a2 Mon Sep 17 00:00:00 2001
From: Toke Eskildsen <te@ekot.dk>
Date: Sat, 1 Feb 2014 20:16:49 +0100
Subject: [PATCH] Closes #11 (Smarter histogram generation)

---
 quack.sh | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/quack.sh b/quack.sh
index aeb3a2c..5356a6e 100755
--- a/quack.sh
+++ b/quack.sh
@@ -77,7 +77,7 @@ export THREADS=4
 # Number of threads used for histograms. Note that histogram generation
 # is very memory hungry (~2GB for a 30MP image), unless HISTOGRAM_PHEIGHT
 # is set to a percentage.
-export HISTOGRAM_THREADS=2
+export HISTOGRAM_THREADS=8
 
 # Number of threads used for pages. Page generation uses very little memory and
 # is almost exclusively CPU bound.
@@ -126,11 +126,12 @@ export CROP_PERCENT=""
 # If auto, histograms will scale individually to the highest value.
 # If script_auto, histograms will scale as with auto, but will be generated by
 # script (slow, low mem) instead of ImageMagick (fast, high mem).
-# Setting a fixed height will slow down histogram generation severely, but
-# also remove much of the memory overhead. If this value is specified, it
-# is therefore recommended to increase HISTOGRAM_THREADS.
+# If auto is specified, it is highly recommended to decrease HISTOGRAM_THREADS
+# to 2-4 on a 4-8GB machine
 # Suggested values are 10-20%
-export HISTOGRAM_PHEIGHT="auto"
+# percentage or script_auto: scripted (low mem, slower)
+# auto: GraphicsMagick (high mem, faster)
+export HISTOGRAM_PHEIGHT="script_auto"
 
 # If true, tiles are generated for OpenSeadragon. This requires Robert Barta's 
 # deepzoom (see link in README.md) and will generate a lot of 260x260 pixel tiles.
-- 
GitLab