Skip to content

Use the new async state machine pooling feature on websockets #50921

Closed
@davidfowl

Description

@davidfowl

Description

Looking at an allocation profile for SignalR, the top allocations are coming from state machines allocated by Kestrel on websocket reads. We should be able to remove these by using the new pooling introduced here #50116.

Regression?

No

Data

image

Analysis

This is the code path:

private async ValueTask<TWebSocketReceiveResult> ReceiveAsyncPrivate<TWebSocketReceiveResultGetter, TWebSocketReceiveResult>(

cc @stephentoub @CarnaViire

Metadata

Metadata

Assignees

Labels

area-System.NetenhancementProduct code improvement that does NOT require public API changes/additionstenet-performancePerformance related issue

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions