You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TBH stuffing this synchronous validation that fetches a value or two, probably should get moved into static method. (AFAIK this can be moved to static although the return may change due to the sequence parsing).
That will improve overall state machine quality and likely improve performance as a result. I peeked at the IL for something close to current main and there's lots of locals and large state machines involved. Sometimes moving certain parts of logic to a static or even separate method can help with that.
Additionally, it's probably worth at least filing an issue to see whether splitting these 'if/else' branches into sub-calls gives a performance or memory boost due to likelyhood State machine will allocate for things only in one path...
TBH initial investigations are showing it's not worth chasing at this time... [AsyncMethodBuilder(typeof(PoolingAsyncValueTaskMethodBuilder<>))] seems to really help things overall for common cases...
That said, It may be worth digging into JetStream internals itself for further opportunities to use [AsyncMethodBuilder(typeof(PoolingAsyncValueTaskMethodBuilder<>))] attribute on methods in that part of the code.
I'm keeping this open for now, until I can do some checks against Jetstream. If I find something will update issue accordingly, otherwise I will close unless we'd rather I roll in a different way. :)
Originally posted by @to11mtm in #688 (comment)
The text was updated successfully, but these errors were encountered: