Use a custom Http2HeadersDecoder to avoid copying
See original GitHub issueIn the meeting today @carl-mastrangelo mentioned that reading headers from the wire and converting between metadata is a major contributor to our allocation profile.
Can’t we just use our own Http2HeadersDecoder
that instead of DefaultHttp2Headers
uses our own Http2Headers
implementation, which would just be an adapter for Metadata
(wrap around Metadata
)? We could thereby avoid copying between Metadata and Http2Headers
, but HPACK would directly store to Metadata
.
Am I missing something? 😅
Issue Analytics
- State:
- Created 7 years ago
- Comments:19 (7 by maintainers)
Top Results From Across the Web
HTTP header manipulation - Envoy Proxy
The HTTP connection manager manipulates several HTTP headers both during decoding (when the request is being received) as well as during encoding (when...
Read more >Content-Encoding - HTTP - MDN Web Docs
The Content-Encoding representation header lists any encodings that have been applied to the representation (message payload), and in what ...
Read more >How Headers Are Used to Block Web Scrapers and How to Fix It
In this article we'll take an extensive look at request headers in web scraping. How can we prevent our web scrapers from being...
Read more >HTTP headers encoding/decoding in Java - Stack Overflow
As long as the user agent sends the values to your custom headers according to these rules you wont have to worry about...
Read more >HTTP/1.1: Header Field Definitions
A server tests whether a content-coding is acceptable, according to an Accept-Encoding field, using these rules: 1. If the content-coding is one of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@buchgr The CharSequence that’s a holder seems like it would work. The devil is in the details so I would be curious how far you get with it. I’m actually working on a Metadata improvement at the same time, so we should coordinate.
I have the change here: https://github.com/carl-mastrangelo/grpc-java/commit/84c2e3713d0d4ac65a8b25641120f6aec9b3ff04 if you want to see the easy changes I am doing in conjunction.
Fixed by 8c18a0d