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

Fast-path zero-byte reads in WebSocketsTelemetryStream ReadAsync #1435

Merged
merged 1 commit into from
Dec 9, 2021

Conversation

MihaZupan
Copy link
Member

Followup to #1415

A Consume of zero bytes is a no-op on the parser, so we can just return the original read task to the caller.

Since we are always doing zero-byte reads, this effectively means that if the underlying stream supports it, WebSocketsTelemetryStream's ReadAsync will never allocate.

@MihaZupan MihaZupan added this to the YARP 1.1.0 milestone Dec 9, 2021
@MihaZupan MihaZupan requested a review from Tratcher as a code owner December 9, 2021 18:54
@MihaZupan MihaZupan merged commit 9bbcc25 into microsoft:main Dec 9, 2021
@MihaZupan MihaZupan modified the milestones: YARP 1.1.0, YARP 1.1.0-RC1 Mar 2, 2022
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.

2 participants