@mcollina @nodejs/http2 ... took a few steps back and refactored the internals significantly. Yields a fairly significant performance boost. Will be continuing to evolve this over the next couple of weeks
stream_base: homogenize req_wrap_obj use
Always use `req_wrap_obj` to allow calling `req->Done()` in stream
I'm starting to think we should not inherit from Readable and Writable, but just from Stream (if at all) for the incoming request and response. Firstly,Readable and Writable do a lot of buffering, which we are already doing inside the Duplex stream. Secondly, there are plenty of calls to resume(), which is a code smell to me. This is "streams 1" API.
require('http') use Stream and streams 1 API.
I'm all for whatever would make it easier and more performant. Most of the performance limitation in this right now is due to the Streams interface along with the need to make the high level API similar to the existing http/1 API. For instance, I'd really prefer getting rid of the separate Http2Request and Http2Response objects entirely and just use the Http2Stream object for both, but doing so would require a more significant high level API change.
http2: major internal refactoring
@jasnell would it be feasible to have a lower-level Http2Stream that can be sufficient to build apps only on HTTP2, and then provide a compat layer to match require('http')? If it's what you are talking about, go for it.
@jasnell I think this is a great topic for #26 .
Landed in master