From: Ciaran Gultnieks Date: Fri, 17 Jun 2016 12:39:01 +0000 (+0100) Subject: Tone down makebuildserver terminal spamming X-Git-Tag: 0.7.0~46^2 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=9a2e06fd5c0aa66c8217b78a0a36d3252d4ec6e8;p=fdroidserver.git Tone down makebuildserver terminal spamming The progress bar updating at each 1k chunk spams the terminal to such an extent it stops responding to keypresses (at least with a fast connection). It also seems extremely inefficient to be writing the file in 1k chunks. This makes it 64k, which is more reasonable but quite probably still too small. --- diff --git a/makebuildserver b/makebuildserver index 0f5cb86e..05616452 100755 --- a/makebuildserver +++ b/makebuildserver @@ -292,8 +292,8 @@ for srcurl, shasum in cachefiles: stream=True, verify=False, allow_redirects=True) content_length = int(r.headers.get('content-length')) with open(local_filename, 'ab') as f: - for chunk in progress.bar(r.iter_content(chunk_size=1024), - expected_size=(content_length / 1024) + 1): + for chunk in progress.bar(r.iter_content(chunk_size=65536), + expected_size=(content_length / 65536) + 1): if chunk: # filter out keep-alive new chunks f.write(chunk)