Skip to content
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

Cache more info on HttpMethod #100177

Merged
merged 2 commits into from
Mar 24, 2024
Merged

Conversation

MihaZupan
Copy link
Member

We're already caching the encoded bytes for HTTP/3. This extends that to H1 and H2.
I also precomputed things like MustHaveRequestBody to avoid some branches on the hot path.

Instead of trying to get the normalized method on each request, that logic is now in the cold path if encoded bytes aren't available yet.

Save a couple ns per request, and 8 bytes off of the H1 state machine allocation (no more normalizedMethod).

@MihaZupan MihaZupan added this to the 9.0.0 milestone Mar 23, 2024
@MihaZupan MihaZupan self-assigned this Mar 23, 2024
@MihaZupan MihaZupan requested a review from a team March 23, 2024 11:22
@stephentoub stephentoub merged commit d12b12a into dotnet:main Mar 24, 2024
87 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Apr 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants