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

http header action, save cpu cycles #13143

Closed
wants to merge 4 commits into from
Closed

Conversation

icing
Copy link
Contributor

@icing icing commented Mar 18, 2024

Saving some cpu cycles in http response header processing:

  • pass the length of the header line along
  • use string constant sizeof() instead of strlen()
  • check line length if prefix is possible
  • switch on first header char to limit checks

Saving some cpu cycles in http response header processing:
- pass the length of the header line along
- use string constant sizeof() instead of strlen()
- check line length if prefix is possible
- switch on first header char to limit checks
@icing icing added the HTTP label Mar 18, 2024
@icing icing requested a review from bagder March 18, 2024 13:35
- try send the complete request directly without copying into
  the send buf first. Buffer the remained that could not be sent
  in on go.
- initial sends contains also header bytes that should not
  be counted against blocked length
- fixes (hopefully) assertion failure in fuzzing
@bagder bagder closed this in 522ea54 Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

2 participants