Merge "Make 'object save' fast again"

This commit is contained in:
Jenkins 2017-01-09 22:12:26 +00:00 committed by Gerrit Code Review
commit b55b1d2b94
2 changed files with 6 additions and 1 deletions

View File

@ -380,7 +380,7 @@ class APIv1(api.BaseAPI):
if len(os.path.dirname(file)) > 0: if len(os.path.dirname(file)) > 0:
os.makedirs(os.path.dirname(file)) os.makedirs(os.path.dirname(file))
with open(file, 'wb') as f: with open(file, 'wb') as f:
for chunk in response.iter_content(): for chunk in response.iter_content(64 * 1024):
f.write(chunk) f.write(chunk)
def object_set( def object_set(

View File

@ -0,0 +1,5 @@
---
fixes:
- |
Makes ``openstack object save`` much faster when saving an object to disk.
[Bug `1654645 <https://bugs.launchpad.net/bugs/1654645>`_]