http-2
http-2 copied to clipboard
10x performance improvements
This is a long batch of changes which I've been slowly patching and testing locally towards improving the performance of the "happy path" of a burst of multiple simultaneous streams on a single connection.
The first commit includes the baseline benchmark (using the singed gem to generate flamegraphs for analysis).
The full changeset will be hard to review. The suggestion is to review each commit separately, as they're all self-contained, and the commit message contains context about the change.
These are the measurements using the benchmark library for 5000 streams over a connection:
BENCH=benchmark bundle exec ruby benchmarks/client_server.rb
# before
6.682099 15.267209 21.949308 ( 22.052998)
# after
0.984433 0.113971 1.098404 ( 1.100675)
👏🏻
I can do a review this week, but it would have been helpful to slice this up into chunks. Are all of the changes related to performance? I see rbs and other refactorings.
@mullermp I understand. I think it's more digestible if you go commit by commit, as each change is independent and context is in the commit message. I don't think it'd help much by making each commit its own MR at this point, but I concede that this may not fit everyone's preferred review workflow.
Are all of the changes related to performance?
I went back to the commit list to keep me honest. I counted only one commit which isn't specifically about performance. RBS changes are about method sig changes, and inconsistencies found as a result of the changes.
@mullermp I did run a few sanity tests 👍