From: Avery Pennarun Date: Thu, 26 Aug 2010 04:06:46 +0000 (-0700) Subject: cmd/midx: fix SHA_PER_PAGE calculation. X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=8b4ac80545db00743f298eba0958dfee550da89a;p=packages%2Fb%2Fbup.git cmd/midx: fix SHA_PER_PAGE calculation. For some reason we were dividing by 200 instead of by 20, which was way off. Switch to 20 instead. Suspiciously, this makes memory usage slightly worse in my current (smallish) set of test data, so we might need to revert it later...? But if we're going to have an adjustment, we should at least make it clear what for, rather than hiding it in something that looks suspiciously like a typo. Signed-off-by: Avery Pennarun --- diff --git a/cmd/midx-cmd.py b/cmd/midx-cmd.py index e43e312..bbfd2ac 100755 --- a/cmd/midx-cmd.py +++ b/cmd/midx-cmd.py @@ -4,7 +4,7 @@ from bup import options, git from bup.helpers import * PAGE_SIZE=4096 -SHA_PER_PAGE=PAGE_SIZE/200. +SHA_PER_PAGE=PAGE_SIZE/20. def merge(idxlist, bits, table):