question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use a custom Http2HeadersDecoder to avoid copying

See original GitHub issue

In 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:closed
  • Created 7 years ago
  • Comments:19 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
carl-mastrangelocommented, Sep 1, 2016

@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.

0reactions
buchgrcommented, Sep 10, 2016

Fixed by 8c18a0d

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found