Skip to content

Conversation

@davidfowl
Copy link
Member

@davidfowl davidfowl commented Apr 24, 2022

Contributes to #41343, continuation of #35011

@JamesNK
Copy link
Member

JamesNK commented Apr 25, 2022

This will avoid the state machine allocation, but my guess is the overhead of pooling/unpooling/resetting the state machine will be slower than allocation + eventual GC.

Need to measure.

@davidfowl
Copy link
Member Author

davidfowl commented Apr 25, 2022

I’m not sure what we need to measure. We do this for literally all of the other state machines in the read code path, we forgot this one.

I updated the description.

@JamesNK
Copy link
Member

JamesNK commented Apr 25, 2022

The goal is RPS to go up and to the right. Have we tested that state machine pooling actually does that?

Edit: I see #35011 had some tests. RPS was basically the same but allocations went down. Probably the same thing here. As long as we aren't pooling at the cost of RPS then go ahead.

@davidfowl
Copy link
Member Author

As long as we aren't pooling at the cost of RPS then go ahead.

Right, that's the idea. Also I really hope we can someday pull this off #35011 (comment). It would be ideal to avoid TLS and just use something a field on object with the async method for this.

@davidfowl davidfowl merged commit b6c5b57 into main Apr 25, 2022
@davidfowl davidfowl deleted the davidfowl/pool-state-machines branch April 25, 2022 06:45
@ghost ghost added this to the 7.0-preview5 milestone Apr 25, 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.

4 participants