Closed rakoo closed 11 years ago
This one fixes #55.
This looks interesting, but I'd like to see how it affects performance in a typical non-pipelined keepalive case. This is adding an awful lot of logic/buffering to the normal request path.
Agreed, both the buffer juggling and the char-by-char look awful. Something interesting would be for the http parser to register the number of bytes parsed since initialization, so that in the case of normal requests we know there is nothing to buffer, only verify it's empty before parsing what's coming from the socket.
I see you're also the maintainer of the http gem, is that something possible ?
@rakoo isn't it the parser ( tmm1/http_parser.rb ) you want to affect though, maintained by @tmm1?
@digitalextremist you are right, the parser is another gem, and a whole another beast.
@rakoo beast
is the best possible word you could have chosen as the parser's descriptor :)
Sorry I haven't had time to look at this... I need to see how much of a perf regression it brings about and if there are ways we can better optimize it before merging
This was fixed by #73. Closing this PR as it's obsolete
Buffer pipelined requests from the socket coming in so that they can be parsed the next time we are ready to use a Reel::Request.