Python client very slow
I came to Couchbase because I was expecting sub millisecond, but the Python client gives me an average of about 3 milliseconds. Is the Python client known to be slow? I come from MongoDB and it gave me an average speed of 500 microseconds.
I have a Couchbase bucket with just one entry (30 bytes) and queried by the key. Configs are default.
Simple get
from couchbase.client import Couchbase
couchbase = Couchbase("127.0.0.1:8091", "s", "")
bucket = couchbase["s"]
one = time.time()
bucket.get("test") # returns: {"domain":4,"nextcrawlglobal":5}
two = time.time()
three = two - one
print three # returns like 0.003
and a view takes like 40 ms:
view = bucket.view("_design/search/_view/getdomains", limit=10)
View, Map:
function (doc, meta) {
emit([doc.domain, doc.nextcrawlglobal]);
}
Couchbase bucket has 3 documents in it. (I thought Couchbase tries to keep them in RAM, tho I know Views are on disk, but 40ms is way too long)
Unfortunately, at this time the Python client is pre-release. Performance is the primary development focus as it moves towards 1.0. You're using the client as it is intended to be used - I saw similar results.
Couchbase will keep documents in RAM (provided it has space). Clearly, with 3 documents, you no doubt have enough RAM.
That's too bad. The Python client is the only client I got working correctly after some time.
Interesting information. I like your topic. Thanks for sharing it.
testking exam questions//ccna dumps download practice test//ccna exploration companion guide practice test//ccna online exam practice test//
Could you post the code that you're using?