in res_client.py in method _http_request you are using
httplib2.Http().request(api, method, params, headers)
it is dozens to hundreds times slower than using urllib (urllib2, urllib3) because there's inefficiency in method readline (in socket.py). this function is linear to the length of the message because of working byte by byte:
look above - 34.97 - it is a time in seconds for getting 180 keys from couchbase. 40883 - it is an execution count.
with urllib.urlopen (or similar) this time reduces to about 3 seconds.
in res_client.py in method _http_request you are using httplib2.Http().request(api, method, params, headers)
it is dozens to hundreds times slower than using urllib (urllib2, urllib3) because there's inefficiency in method readline (in socket.py). this function is linear to the length of the message because of working byte by byte:
look above - 34.97 - it is a time in seconds for getting 180 keys from couchbase. 40883 - it is an execution count. with urllib.urlopen (or similar) this time reduces to about 3 seconds.