FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Streamline HTTP/2 request header copy by hyperxpro · Pull Request #2181 · AsyncHttpClient/async-http-client · GitHub

Streamline HTTP/2 request header copy - #2181

Merged
hyperxpro merged 2 commits into
mainfrom
perf/h2-header-copy
Jun 4, 2026
Merged

Streamline HTTP/2 request header copy#2181
hyperxpro merged 2 commits into
mainfrom
perf/h2-header-copy

Conversation

Copy link
Copy Markdown
Member

Motivation:

sendHttp2Frames copies HTTP/1.1 headers into Http2Headers on every HTTP/2 request (hot path):
String-materializes each name, toLowerCase() per name, HashSet probe — plus a
path + "?" + query concat for :path.

Modification:

:path from Uri.toRelativeUrl() (pooled, byte-identical); copy via iteratorCharSequence() +
AsciiString.contentEqualsIgnoreCase against HttpHeaderNames, dropping HTTP2_EXCLUDED_HEADERS.
Still lowercases (validating DefaultHttp2Headers throws on uppercase) but allocation-free when
already lowercase. Adds wire + :path-equivalence tests; updates the JMH benchmark.

Result:

Behavior-preserving; ~1.17x faster, -24 B/op (JMH, JDK 11). Full CI matrix green.

…header validation'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
hyperxpro merged commit a004274 into main Jun 4, 2026
17 checks passed
hyperxpro deleted the perf/h2-header-copy branch June 4, 2026 19:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL