Playmaker Forum

PlayMaker Feedback => Feature Requests => Topic started by: jeanfabre on May 17, 2011, 02:46:43 AM

Title: [SOLVED] performance issues with broadcast events
Post by: jeanfabre on May 17, 2011, 02:46:43 AM
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
Title: Re: performance issues with broadcast events
Post by: jeanfabre on May 17, 2011, 03:08:06 AM
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
Title: Re: [SOLVED] performance issues with broadcast events
Post by: Alex Chouls on May 24, 2011, 02:48:14 PM
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.
Title: Re: [SOLVED] performance issues with broadcast events
Post by: jeanfabre on May 25, 2011, 01:23:26 AM
Hi Alex,

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