Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More efficient FSM #9

Open
nyarly opened this issue Feb 10, 2014 · 0 comments
Open

More efficient FSM #9

nyarly opened this issue Feb 10, 2014 · 0 comments

Comments

@nyarly
Copy link
Owner

nyarly commented Feb 10, 2014

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant