GitHub user pquentin opened a pull request: https://github.com/apache/libcloud/pull/1053
Restore RawResponse speed RawResponse uses response.body from requests, which is pathologically slow due to chardet (requests#2359). Since we're only interested in the bytes, using response.content is faster. On a 3Mib file, this makes a download_object() go from 40s to 4s. ## Restore RawResponse speed ### Description RawResponse uses response.body from requests, which is pathologically slow due to chardet (requests#2359). Since we're only interested in the bytes, using response.content is faster. On a 3Mib file, this makes a download_object() go from 40s to 4s. ### Status - done, ready for review ### Checklist (tick everything that applies) - [x] [Code linting](http://libcloud.readthedocs.org/en/latest/development.html#code-style-guide) (required, can be done after the PR checks) - [ ] Documentation - [x] [Tests](http://libcloud.readthedocs.org/en/latest/testing.html) - [ ] [ICLA](http://libcloud.readthedocs.org/en/latest/development.html#contributing-bigger-changes) (required for bigger changes) You can merge this pull request into a Git repository by running: $ git pull https://github.com/pquentin/libcloud patch-2 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/libcloud/pull/1053.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1053 ---- commit b0b464082c0a7867dfb0b28a7132818563deeae7 Author: Quentin Pradet <quen...@clustree.com> Date: 2017-05-04T20:25:17Z Restore RawResponse speed RawResponse uses response.body from requests, which is pathologically slow due to chardet (requests#2359). Since we're only interested in the bytes, using response.content is faster. On a 3Mib file, this makes a download_object() go from 40s to 4s. ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---