-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
StreamPipeReader does not amortize ValueTask ReadAsync calls #30169
Comments
davidfowl
changed the title
StreamPipeReaders don't amortize their ValueTask ReadAsync calls
PipeReaderStream does not amortize their ValueTask ReadAsync calls
Jul 7, 2019
davidfowl
changed the title
PipeReaderStream does not amortize their ValueTask ReadAsync calls
PipeReaderStream does not amortize ValueTask ReadAsync calls
Jul 7, 2019
benaadams
changed the title
PipeReaderStream does not amortize ValueTask ReadAsync calls
StreamPipeReader does not amortize ValueTask ReadAsync calls
Jul 13, 2019
maryamariyan
added
the
untriaged
New issue has not been triaged by the area owner
label
Feb 23, 2020
BrennanConroy
removed
the
untriaged
New issue has not been triaged by the area owner
label
Jul 8, 2020
This is a candidate for state machine pooling |
@davidfowl @halter73 @jkotalik this is marked 6.0. please either fix or change milestone by aug 17. |
I'll take this one. |
Moving to .NET 7 |
Yep I'll do it in 7 |
ghost
added
the
in-pr
There is an active PR which will close this issue when it is merged
label
Apr 24, 2022
ghost
removed
the
in-pr
There is an active PR which will close this issue when it is merged
label
Apr 27, 2022
ghost
locked as resolved and limited conversation to collaborators
May 27, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In usage a StreamPipeReader type normally has very many ReadAsync calls made on it. (Use case WebSockets/SignalR over TLS)
Using the ValueTask overloads for StreamPipeReader read allocates a AsyncStateMachineBox per read (when data is not immediately available)
However it could use
TryRead
for the sync-path and allocating a IValueTaskSource object the first time that fails to back the async read, and then reuse it each time the read needs to go async again.Related: dotnet/aspnetcore#11940
The text was updated successfully, but these errors were encountered: