Skip to content

Add PoolingAsyncValueTaskMethodBuilder to System.Net.Security.SslStream.ReadAsyncInternal() #68467

@davidfowl

Description

@davidfowl

As part of the work to reduce the allocation overhead of websocket reads (and possibly writes), there are 3 state machine allocations that happen per-read remaining in the end to end scenario in ASP.NET Core:

Ideally, we'd add the PoolingAsyncValueTaskMethodBuilder here to avoid the extra allocation when TLS is involved (which is most of the time these days 😄). This would make our server websocket end to end mostly allocation free on a per operation basis.

PS: The writing size needs to be investigated as well but haven't shown up on many profiles that I've seen (mostly because there hasn't been backpressure).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions