-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
area-System.Net.HttpenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additionstenet-performancePerformance related issuePerformance related issue
Milestone
Description
Supporting zero-byte read helps users of these APIs reduce memory usage. It allows them to release their read buffers when no data is currently available.
We should support this in our HTTP response streams in SocketsHttpHandler, including RawConnectionStream since this is used for WebSockets and tunneling scenarios.
Ideally we would also release our own read buffer (if any and if possible) and issue a zero-byte read against the underlying connection. This is what SslStream does (as of 6.0). The idea here is that the user has indicated their interest in minimizing buffer memory usage, and so we should do the same for our own internal buffers.
I split this issue off from #61223.
Metadata
Metadata
Assignees
Labels
area-System.Net.HttpenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additionstenet-performancePerformance related issuePerformance related issue