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

Provide a way to force the queue write strategy, again #2676

Closed
nox opened this issue Oct 27, 2021 · 0 comments
Closed

Provide a way to force the queue write strategy, again #2676

nox opened this issue Oct 27, 2021 · 0 comments
Labels
C-feature Category: feature. This is adding a new feature.

Comments

@nox
Copy link
Contributor

nox commented Oct 27, 2021

Once upon a time, there was a way to force Hyper to use the queue write strategy.

This functionality was then removed from Hyper 0.14.0.

Unfortunately, the heuristic to decide whether to use flatten or queue strategy has its limits. In my case, I need to buffer the output of an egress HttpBody implementation until a few MBs, and then I pass that big buffer to Hyper to write it over a h1 stream. When I pass it, Hyper is using the flatten strategy, so it ends up copying the entire big buffer again.

I'll make a PR to restore the builder setter to force queue strategy.

@nox nox added the C-feature Category: feature. This is adding a new feature. label Oct 27, 2021
@nox nox changed the title Provide a way to force the queue writev strategy, again Provide a way to force the queue write strategy, again Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category: feature. This is adding a new feature.
Projects
None yet
Development

No branches or pull requests

1 participant