-
Notifications
You must be signed in to change notification settings - Fork 163
Optimize the multi-bulk reply handling #36
Comments
Yes, you're right. The processing of the multi-bulk replies if far more efficient in redis-py client. I'll add a note on Redis client usage to the README file to indicate it. |
Thank you very much. I guess the reason is because the use of hiredis. 👍 |
No. Tornado-redis is MUCH slower even if hiredis is not being used by redis-py. The current implementation of multi-bulk reply processing in tornado-redis creates a callback to virtually every received byte of data and this is the main reason of such a poor performance. I plan to refactor this code and add the hiredis support to tornado-redis. However, at this moment it's better to use redis-py for non-blocking commands. |
Don't you mind if I rename the issue to 'Optimize the multi-bulk reply handling'? |
how to use redis-py for non-blocking pub-sub command?? |
I suggest using tornado-redis for these. But you may use redis-py in your Tornado application for GET's, MGET's and other non-blocking commands and get the faster and easier-to-maintain code. |
I've added a note to the README file on this matter: https://github.com/leporo/tornado-redis#tornado-redis-vs-redis-py |
Thank you for your kindness. I don't mind you rename the issue. I'm also excited about how the performance changes after the issue be finished. |
ok thank you..because I don't get better implemetation redis pub/sub beside this library thanks |
SyncMset is much quicker than AsyncMset. Is that right?
I ran the demos/benchmark/app.py and found that SyncMset is much quicker than AsyncMset. Is it work right?
My logging:
INFO:tornado.access:200 GET /redis-py/mset (192.168.1.100) 83.39ms
WARNING:tornado.access:404 GET /favicon.ico (192.168.1.100) 0.41ms
INFO:tornado.access:200 GET /mset (192.168.1.100) 1736.85ms
WARNING:tornado.access:404 GET /favicon.ico (192.168.1.100) 0.40ms
I installed tornado, redis, redis-py, torando-redis today.
tornado version is 3.0.1.
redis-py version is 2.7.5.
tornado-redis version 2.4.2.
Redis server v=2.6.13 sha=00000000:0 malloc=jemalloc-3.2.0 bits=32
By the way, my linux version is "centOS 6.2(Final)" and "kernel linux 2.6.32-220.e16.i686".
The text was updated successfully, but these errors were encountered: