mirror of
https://github.com/apple/swift-nio-http2
synced 2026-11-24 04:38:00 +00:00
Motivation: Previously the HTTP2StreamChannel forwarded all frames to the parent Channel by way of the abstract Channel existential API. While this was straightforward, it added unnecessary overhead due to the extra pipeline steps and the extra indirection of the types providing an inlining barrier. Given that in #116 we gave the HTTP2StreamChannel a reference to its parent multiplexer, we may as well take advantage of this and allow direct calls from the stream channel into the multiplexer. Modifications: Avoided calls to parent.write and parent.flush. Replaced them with a new interface. Added new allocation test for this path. Result: Slightly better performance.