-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
Add StreamMap class for efficient stream-based mapping #768
base: main
Are you sure you want to change the base?
Conversation
Motivation: - Need a data structure that efficiently handles stream-based key-value mappings - Require a solution that can manage sequential data with integer-based indexing - Want to leverage the existing ArrayRingBuffer implementation for optimal memory usage Modifications: - Add(StreamMap): Added core operations: put(), get(), size(), and remove(). Integrated ArrayRingBuffer as the underlying data structure - Add(ArrayRingBuffer): Fork from https://gist.github.com/franz1981/6277af990ccfe0a5da8542a75d66ce5e Result: - Enables sequential access to stored values using integer keys - Maintains O(1) time complexity for basic operations
@normanmaurer @tsegismont DefaultHttp2Connection class currently uses IntObjectMap to implement streamMap, which contains Http2Stream objects. Each Http2Stream maintains its state and stream ID. The streamMap is used in 8 different locations in the code:
I have implemented a new streamMap class that maintains the same functionality and interface as the original implementation. |
@normanmaurer @tsegismont @franz1981 Hello. |
@Bue-von-hon How about go with gathing? |
Oh... I will try it. 👍 |
This is the QUIC repo, but if you only want to benchmark HTTP/2, we have some microbenchmarks in the main netty repo: https://github.com/netty/netty/tree/4.1/microbench/src/main/java/io/netty/handler/codec/http2 |
Motivation:
Modifications:
Result: