From 4439299be2b90f405bcb73598ca04881d29ebc43 Mon Sep 17 00:00:00 2001
From: Amir MOHAMMADI <amir.mohammadi@idiap.ch>
Date: Mon, 15 Mar 2021 16:16:35 +0100
Subject: [PATCH] [dav][upload] increase block size for sha256 computation to
 improve performance

---
 bob/devtools/dav.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bob/devtools/dav.py b/bob/devtools/dav.py
index e01cfd2c..3e3d83bc 100644
--- a/bob/devtools/dav.py
+++ b/bob/devtools/dav.py
@@ -57,7 +57,7 @@ def _get_config():
 def compute_sha256(path):
     sha256_hash = hashlib.sha256()
     with open(path, "rb") as f:
-        for byte_block in iter(lambda: f.read(4096), b""):
+        for byte_block in iter(lambda: f.read(65535), b""):
             sha256_hash.update(byte_block)
     file_hash = sha256_hash.hexdigest()
     return file_hash
-- 
GitLab