mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-08 21:18:04 +03:00
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:
parent
1c98328e82
commit
d3c627f189
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user