-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
Perfarea-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Milestone
Description
Use [AsyncMethodBuilder(typeof(PoolingAsyncValueTaskMethodBuilder<>))] on Kestrel ReadAsync methods to remove per read allocations in the mainline body reading logic.
Places of interest:
private async ValueTask<int> ReadAsyncInternal(Memory<byte> destination, CancellationToken cancellationToken) private async ValueTask<ReadResult> ReadAsyncInternalAwaited(ValueTask<ReadResult> readTask, CancellationToken cancellationToken = default) public override async ValueTask<ReadResult> ReadAsync(CancellationToken cancellationToken = default) aspnetcore/src/Servers/Kestrel/Core/src/Internal/Http/Http1ContentLengthMessageBody.cs
Line 32 in d1c349f
public override async ValueTask<ReadResult> ReadAsyncInternal(CancellationToken cancellationToken = default) public override async ValueTask<ReadResult> ReadAsync(CancellationToken cancellationToken = default)
cc @BrennanConroy Part of this is to make WebSockets allocation free.
BrennanConroy
Metadata
Metadata
Assignees
Labels
Perfarea-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions