volumeupload: Use 1MiB read size

Rather than 1K. This drastically speeds up the volumeupload case
for a local URI for the cost of some higher runtime memory but
I think that's worth it

Fixes: #221

Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Cole Robinson 2021-02-03 14:02:32 -05:00
parent 1c98328e82
commit d3c627f189
1 changed files with 1 additions and 2 deletions

View File

@ -108,8 +108,7 @@ def _upload_file(conn, meter, destpool, src):
meter.start(size=size,
text=_("Transferring %s") % os.path.basename(src))
while True:
# blocksize = (1024 ** 2)
blocksize = 1024
blocksize = 1024 * 1024 # 1 MiB
data = fileobj.read(blocksize)
if not data:
break