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
Hpack
optimizations
#7086
Hpack
optimizations
#7086
Conversation
Co-authored-by: "Diego E. Alonso" <diesalbla@gmail.com>
val decoded = buffer.toList | ||
NonEmptyList.fromList(decoded).toRight(new NoSuchElementException("Header List Was Empty")) | ||
}.rethrow | ||
val decoded = buffer.result() | ||
NonEmptyList.fromListUnsafe(decoded) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, forgot to mention: we can use fromListUnsafe
because we are in a delay(...)
block anyway, and skip the .rethrow
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be consecutive, I usually ask for some numbers to prove that we get better performance when it comes to some optimizations. But Arman definitely knows what he does (also, changes look good to me)!
ByteVector#toInputStream
andByteVectorOuputStream
for copy-free conversionsList.newBuilder
instead ofListBuffer
(not sure if this makes a difference, but intent is clearer)Mutex
instead ofSempahore(1)
(performance is optimized and communicates intent)