-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New connection parser #113
Conversation
The new implementation is more performant and "sane". Moreover, it required a refactoring of the reconnection logic, which has lead to a more 'stable' algorithm.
@adamvr, If it is not a problem I'll release it as 0.3.0 over the weekend |
@mcollina I'm unsure about the stream builder thing. Is there actually a problem with reusing the same socket? |
You were doing it wrong before. Node.js sockets retain same state when they close, and they cannot be piped again. The |
Aha, okay. I guess I'll defer to you then. Make it so, Mr. Collina! |
p.s. node_redis just calls connect again on the socket as far as I can tell. See https://github.com/mranney/node_redis/blob/master/index.js#L479-494 |
Maybe it is a node v0.10/stream2 thing, I am not sure. |
Do you think it is better to release it as 0.3.0, or just as the next in the 0.2.x series? |
Is it actually necessary to have a full pipe, though? I mean, the only information the parser needs to know from the stream is the data coming out of it, not whether or not the stream is connected, disconnected, closing, piping or whatever. I'm having good (passing tests) results just doing something like:
Any chance you could gist your benchmarks so I can test that against them? As to the version number, I don't know. I would probably put it in the 0.2.x since it isn't an API changing change (externally, anyway. I'm sure the few if any people who do |
The real difference is that by using |
Already included in #118. |
I was able to get some better performance numbers from our poor Connection class.
@adamvr could you please review it?
I'm getting something near 10% increase.