mSignals vs Events performance


Sorry for posting this kind of “this vs that” post, but I don’t know how to run a proper comparision test. I ran into this mSignals library. Besides the differences in usage, is there any noticeable performance difference or issues to be aware of?
I’m building mostly for cpp and android


I would recommend you consider Lime events, which behave like signals but (I think) are a bit more elegant in execution :smile:

The big difference is that the Event model in ActionScript will optionally bubble up through a DisplayObject’s parents, it also uses Event objects, which can cause additional garbage collection if you generate a new one whenever you dispatch your event (which is common)

Lime Events in contrast (which work like signals and slots) are a direct callback. There’s no additional object, but sometimes that’s a bummer if you later decide to push some additional data onto your event. At a low-level (like Lime mouse events) I think it makes a difference, but for most user signals/events it’s mostly a matter of taste?

Here is an example of a custom Lime event:

var event = new Event<Float->Bool->Void> ();
event.add (function (a, b) {
    trace (a);
    trace (b);
event.dispatch (100, true);

Well, that’s great, I’ll give it a try.

Anyways, am I missing something or this is not documented? I didn’t find a thing in the openfl docs neither online


It’s here:

…but we need more documentation :slight_smile: