Skip to content

Conversation

@Tratcher
Copy link
Member

@Tratcher Tratcher commented Apr 22, 2022

Contributes to #41305

When passed a zero-byte buffer Http.Sys returns ERROR_MORE_DATA. We need to handle this specially. I also had to change the argument validation.

Perf impact:

  • zero-byte reads to Http.Sys always complete async, even when data is available and a normal read could complete sync. This adds latency to the request.
  • Setup: Upload a 20mb request body using a 16k read buffer.
    • No zero-byte read: 65ms
    • With zero-byte reads: 105ms.

@Tratcher Tratcher self-assigned this Apr 22, 2022
@Tratcher Tratcher requested a review from davidfowl April 22, 2022 22:53
@Tratcher Tratcher force-pushed the tratcher/0b/httpsys branch from 025be6a to c4018e9 Compare April 25, 2022 21:31
@Tratcher Tratcher force-pushed the tratcher/0b/httpsys branch from c4018e9 to 78516ae Compare April 25, 2022 23:11
@Tratcher Tratcher marked this pull request as ready for review April 25, 2022 23:41
@Tratcher Tratcher requested a review from JamesNK April 27, 2022 18:18
@Tratcher Tratcher merged commit d176b2a into dotnet:main Apr 27, 2022
@Tratcher Tratcher deleted the tratcher/0b/httpsys branch April 27, 2022 22:45
@ghost ghost added this to the 7.0-preview5 milestone Apr 27, 2022
@davidfowl davidfowl added the Perf label Aug 26, 2022
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions Perf

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants