p5-RedisDB / RedisDB

Perl extension to access Redis
22 stars 11 forks source link

feature request: XS protocol parser #9

Closed bigunyak closed 12 years ago

bigunyak commented 12 years ago

Hi Pavel!

I think the most projects which use Redis are meant to work under high load and the client should be really fast. After profiling my program with Devel::NYTProf module I was surprised to see that the most time my program spend in the _parse_reply method. There are some modules on CPAN which implement Redis protocol parser in C language, as Redis::Parser::XS and Protocol::Redis::XS. I guess such parsers should work faster than the one which is written in Perl. Have you thought about using one of these modules or write your own?

trinitum commented 12 years ago

Yes, I'm planning to implement XS version of parser, but can't give any time estimates. Problem with Protocol::Redis::XS is that I would have to postprocess data structures it returns, so it won't be that much faster.

trinitum commented 12 years ago

I uploaded version 1.99_01, which includes XS implementation of the parser. It is not ready for production use yet, but maybe you will be interested to test it.

trinitum commented 12 years ago

Version 2.00 implements this feature