PlayMaker Feedback > Feature Requests

[SOLVED] performance issues with broadcast events

(1/1)

jeanfabre:
Hi,

 As the project grows, I start seeing latency when using broadcast action. It becomes a problem now. As Fsm relies on Events to communicate. Is there any plans to improve on the events system to let interested parties registering to events, that would prevent shaving to broadcast. Or maybe the api involved in gathering all fsm, etc etc could be improved to minimize the impact on the perfs.

I am currently trying to improve the code itself ( like calling only fsm with the given event ), but meanwhile, you might have suggestions.


 Bye,

 Jean

jeanfabre:
Hi,

 Actually, it's the debug line to the console that was creating this latency :).

anyway, I think there is room for improvement, since a call is made to fsm that do not have the event in question. The thing is that fsm.Events is protected ( tried to implement a check in the action itself). How can I overcome this and scan or query a fsm if it has or not a given fsm?

 Bye,

 Jean

Alex Chouls:
In 1.2 you can use fsm.HasEvent(eventName).

1.2 also eliminates string compares from runtime event handling, so you might see a performance boost with that.

jeanfabre:
Hi Alex,

 Yes :) not only a perf boost but a more robust design not breaking because you renamed an event. Thanks :)

Navigation

[0] Message Index

Go to full version