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

actix-http: play with allowing bytes passthrough in the h1 encoder #3368

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

asonix
Copy link
Contributor

@asonix asonix commented May 18, 2024

PR Type

?????Bug?????? (reduces memory use)

PR Checklist

  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • A changelog entry has been made for the appropriate packages.
  • Format code with the latest stable rustfmt.
  • (Team) Label with affected crates and semver status.

Overview

This is just me playing around with how to possibly avoid growing a persistent buffer to incredibly large sizes by allowing already-allocated Bytes types to pass through directly to IO in the h1 dispatcher

Comments very welcome

relates to #3367

@asonix
Copy link
Contributor Author

asonix commented May 19, 2024

I added a couple additional endpoints to the actix-web example in actix-http so I could run wrk against it

CPU: 12th Gen Intel(R) Core(TM) i5-12400
system: Linux firestar 6.9.1 #1-NixOS SMP PREEMPT_DYNAMIC Fri May 17 10:18:09 UTC 2024 x86_64 GNU/Linux

command: wrk -t12 -c400 -d30s $endpoint

for / and /medium performance is similar to the master branch
for /large performance is significantly improved

note that this isn't testing streaming bodies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant