hpack icon indicating copy to clipboard operation
hpack copied to clipboard

Listener interface causes lots of string creation & parsing overhead

Open louiscryan opened this issue 10 years ago • 1 comments

Even though header names are required to be strings the interface emits them as byte[] which requires the recipient to decode and copy to create the equivalent string every time creating unnecessary garbage.

Additionally many common values have a parsed representation that is not a string:

  • numeric type (:status)
  • repeated value (content-encoding),
  • more complex structure (P3P, User-Agent, ..)
  • handler reference (:path)

Being able to store the representations that applications ultimately use with values cached in the hpack table will lower parsing costs.

louiscryan avatar Oct 28 '15 00:10 louiscryan

@scottmitch @nmittler from Netty land

Related stuff https://github.com/netty/netty/issues/3597

louiscryan avatar Oct 28 '15 18:10 louiscryan