Skip to content

Use Huffman code in HPackEncoder #4742

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
JunTaoLuo opened this issue Jun 25, 2018 · 5 comments
Open

Use Huffman code in HPackEncoder #4742

JunTaoLuo opened this issue Jun 25, 2018 · 5 comments
Labels
affected-very-few This issue impacts very few customers area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-kestrel HTTP2 Perf severity-nice-to-have This label is used by an internal tool
Milestone

Comments

@JunTaoLuo
Copy link
Contributor

Currently we are using a direct encoding when we encode headers. We can optimize by using Huffman code: https://tools.ietf.org/html/rfc7541#section-2.4.

Related work:

@JunTaoLuo
Copy link
Contributor Author

@aspnet-hello aspnet-hello transferred this issue from aspnet/KestrelHttpServer Dec 13, 2018
@aspnet-hello aspnet-hello added this to the 3.1.0 milestone Dec 13, 2018
@aspnet-hello aspnet-hello added area-servers enhancement This issue represents an ask for new feature or an enhancement to an existing one HTTP2 Perf feature-kestrel labels Dec 13, 2018
@analogrelay analogrelay modified the milestones: 3.1.0, 3.0.0-preview8, Backlog Jun 4, 2019
@scalablecory
Copy link
Contributor

See dotnet/corefx#41805 where I updated our shared HPackEncoder to support this.

I prototyped it a few different ways and found that even with lots of optimization, the CPU usage introduced by Huffman coding was unacceptable.

@jkotalik jkotalik added affected-very-few This issue impacts very few customers severity-nice-to-have This label is used by an internal tool labels Nov 13, 2020 — with ASP.NET Core Issue Ranking
@davidfowl
Copy link
Member

@JamesNK did we do this?

@JamesNK
Copy link
Member

JamesNK commented May 31, 2021

No.

I don't think huffman encoding is very valuable. We'd only use it with large header values and only if not already compressed with HPack.

@davidfowl
Copy link
Member

Should we close then?

@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affected-very-few This issue impacts very few customers area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-kestrel HTTP2 Perf severity-nice-to-have This label is used by an internal tool
Projects
None yet
Development

No branches or pull requests

9 participants