-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Bad performance for "hgetall" #112
Comments
This is were thing are happening:
|
Oh I see, it is iterating twice on the reply
Also I could give a sizeHint to the map builder |
Here we could also use a Seq builder and give a sizeHint |
Japp, just move the map inside the builder? |
Moved back to https://github.com/debasishg/scala-redis with connection pooling. The same test (with 20k values) performs around 15 req/s. |
It should be resolved now
Tell me if you don't see similar perf ( I can do 15 hgetall/s with 10k elements with one single connection) |
Thanks, |
I'm sorry, the code cannot be disclosed, but it should be easy to reproduce using scala-redis future with connection pool example. Is this project using multiple connections, or just one? |
Hum I see, the main difference is the number of connection to the redis server. |
Okay, Before I was decoding a full redis response, and if I did not have the full response, I was starting again when receiving the next packet. It works with small response. But the response for HGETALL with 10000 hashes is around 1MB! So the decoding is deadly slow. Conclusion is that now I am even faster than scala-redis. I will clean and post the result before the end of the year. |
Great! I can't see any code here yet? |
I create a PR #119 |
snapshot available
|
Trying to get a hashmap with 10 000 simple elements like this:
is extremely slow. It takes around 1 seconds to get all those values out, with a simple mapping. I suspect the algorithm to parse the results is too slow, and maybe is performing exponentially slow with increasing values.
The text was updated successfully, but these errors were encountered: