Hi,
Just a quick little performance question. For clarity/neatness I prefer to separate some actions into different states and just use finished to pass through them.
Does this passing between states take up a lot of performance so its preferable to bunch all actions into one state instead?
You would have to see with Alex or Jean. Going from state to state requires an event, even if local. This, no matter what, requires processing of some kind, even if minimal.
But as others have said, you would notice some loss in performance only if you had near a thousand loops within a FSM (by default you can't do 1000 loops but this limit can be changed although I wouldn't see the usefulness of doing this).
Using more states provides clarity but sometimes it's better to have a few actions packed inside a same state, if it really makes sense; that is, if all actions really do collaborate to do something that is topical and different from what any other state would do.
For example, calculate a float, convert it to an int and then set this as data to an event that you would send, all within the same state.
There's also the GOTO action which, iirc, consumes less TERAFLOOOPz than events. But it's
dangerous.