Skip to content

More efficient FSM #9

Description

@nyarly

I don't know that there's a simple fix for this but:

As I understand it, the current approach to the Session FSM clobbers the Ruby method cache on every state transition. I'd expect that performance of sockjs servers would therefore be much worse than ideal.

The best solution I can see would be to establish Session as a facade on a pair of objects: a stateless SessionRecord with all instance variables on it, and a SessionState with no internal state, but which acts on the SessionRecord. The result would unavoidably be that the states would be more complicated (since they'd need to be funnelling arguments to the @record object), but the state implementation would be simpler, and the over system would run faster.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions