Comment 2 for bug 1280275

Revision history for this message
Alan Pevec (apevec) wrote :

> git bisect of python-swiftclient identifies a commit that seems to be causing the extra memory usage
> https://review.openstack.org/#/c/69187/

Specifically:
933 + conn.putrequest(path, headers=headers, files={"file": contents})

Quotes from #openstack-swift for posterity:
" the 'files' requests parameter was a bad move as it causes the file to be read in memory before being sent"
" if you use 'files={"file": contents}' as arg for requests it iterates over all files, building the data in memory"