You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by an...@apache.org on 2017/05/04 22:53:30 UTC

[1/2] libcloud git commit: Restore RawResponse speed

Repository: libcloud
Updated Branches:
  refs/heads/trunk a421668d1 -> 6c0b17f10


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.

Closes #1053


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/1fecfa0d
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/1fecfa0d
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/1fecfa0d

Branch: refs/heads/trunk
Commit: 1fecfa0d0e3545032e78b0e49965ce75d914e9b6
Parents: a421668
Author: Quentin Pradet <qu...@clustree.com>
Authored: Fri May 5 00:25:17 2017 +0400
Committer: Anthony Shaw <an...@apache.org>
Committed: Fri May 5 08:51:58 2017 +1000

----------------------------------------------------------------------
 libcloud/common/base.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/1fecfa0d/libcloud/common/base.py
----------------------------------------------------------------------
diff --git a/libcloud/common/base.py b/libcloud/common/base.py
index 6a9361b..063f52b 100644
--- a/libcloud/common/base.py
+++ b/libcloud/common/base.py
@@ -278,7 +278,7 @@ class RawResponse(Response):
         if not self._response:
             response = self.connection.connection.getresponse()
             self._response = HttpLibResponseProxy(response)
-            self.body = response.text
+            self.body = response.content
             if not self.success():
                 self.parse_error()
         return self._response


[2/2] libcloud git commit: changes for #1053

Posted by an...@apache.org.
changes for #1053


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/6c0b17f1
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/6c0b17f1
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/6c0b17f1

Branch: refs/heads/trunk
Commit: 6c0b17f1085ebfb3243ed81849a97b25cfd6147b
Parents: 1fecfa0
Author: Anthony Shaw <an...@apache.org>
Authored: Fri May 5 08:53:25 2017 +1000
Committer: Anthony Shaw <an...@apache.org>
Committed: Fri May 5 08:53:25 2017 +1000

----------------------------------------------------------------------
 CHANGES.rst | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/6c0b17f1/CHANGES.rst
----------------------------------------------------------------------
diff --git a/CHANGES.rst b/CHANGES.rst
index e0e6ebd..b5704dc 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -15,6 +15,10 @@ Common
   [GITHUB-1038]
   (Anthony Shaw)
 
+- Switch RawResponse class to use content body instead of text body, up to 10x performance improvement for methods like StorageDriver.download_object
+  [GITHUB-1053]
+  (Quentin Pradet)
+
 Compute
 ~~~~~~~