From 70a3cf36d1b0f2ee9237244fb37e5828263b6d2a Mon Sep 17 00:00:00 2001 From: ed Date: Sun, 21 Apr 2024 23:53:04 +0000 Subject: [PATCH] pipe: only flush FDs when necessary should give higher performance on servers with slow storage --- copyparty/httpcli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index 05483d08..227ec2ea 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -3188,7 +3188,7 @@ class HttpCli(object): data_end = file_size break - if num_need != len(job["need"]): + if num_need != len(job["need"]) and data_end - lower < 8 * M: num_need = len(job["need"]) data_end = 0 for cid in job["hash"]: