netty / netty-incubator-codec-quic

Apache License 2.0
304 stars 72 forks source link

Consider implementing a custom stream map #54

Open normanmaurer opened 4 years ago

normanmaurer commented 4 years ago

See https://github.com/apple/swift-nio-http2/pull/258

Bue-von-hon commented 5 days ago

I will participate. 💪

tsegismont commented 4 days ago

Hi @Bue-von-hon , I talked about this with @franz1981 and was planning to start working on it in a few weeks. But if you have some time now, that's great.

Here are a couple things we discussed and that might be of interest.

Unlike swift-nio-http2, Netty already uses a "specialized" data structure to store stream state, IntObjectHashMap. So the possible performance gains, if any, may not be as important as described in https://github.com/apple/swift-nio-http2/pull/258.

The plan was to benchmark (probably using techempower plaintext scenario adapted to HTTP/2) and see whether the cost of IntObjectHashMap pops up.

Regarding possible implementations, @franz1981 pointed to his ArrayRingBuffer experiment as a starting point.