From 7f5b3f265d128d8860cbe0c2fa0d0a570a18c28c Mon Sep 17 00:00:00 2001 From: Matt Kubilus Date: Fri, 27 Oct 2023 17:30:33 -0400 Subject: [PATCH] Only update progress every 1000 downloaded blocks --- autoortho/downloader.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autoortho/downloader.py b/autoortho/downloader.py index fbb6aa2f..a28b1a0f 100644 --- a/autoortho/downloader.py +++ b/autoortho/downloader.py @@ -224,7 +224,8 @@ def _show_progress(self, block_num, block_size, total_size): MBps = (total_fetched/1048576) / elapsed cur_activity['pcnt_done'] = pcnt_done cur_activity['MBps'] = MBps - print(f"\r{pcnt_done:.2f}% {MBps:.2f} MBps", end='') + if block_num % 1000 == 0: + print(f"\r{pcnt_done:.2f}% {MBps:.2f} MBps", end='') cur_activity['status'] = f"Downloading {self.dl_url}\n{pcnt_done:.2f}% {MBps:.2f} MBps" def check(self):