From: Zbigniew Jędrzejewski-Szmek Date: Thu, 8 Dec 2016 15:16:21 +0000 (-0500) Subject: mkosi: increase buffer size when hashing files X-Git-Tag: v2~33^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F45%2Fhead;p=thirdparty%2Fmkosi.git mkosi: increase buffer size when hashing files We need to do some buffering here, because the files we are hashing can be gigabytes in size, but Python loops are slow, so it's better to use a larger buffer. --- diff --git a/mkosi b/mkosi index 35db5bc60..e3f325655 100755 --- a/mkosi +++ b/mkosi @@ -1074,7 +1074,7 @@ def copy_nspawn_settings(args): return f def hash_file(of, sf, fname): - bs = 65536 + bs = 16*1024**2 h = hashlib.sha256() sf.seek(0)