My question is more like “How dispatching custom event effects performance, if there is no listeners for these events?”
For example i have the following function:
public function checkSomething():void{
if(someBolean){
doSpecificSomething1();
dispatchEvent(new CustomEvent(target, CustomEvent.GENERAL_EVENT);
dispatchEvent(new CustomEvent(target, CustomEvent.SPECIFIC_EVENT_1);
}
if(someOtherBolean){
doSpecificSomething2()
dispatchEvent(new CustomEvent(target, CustomEvent.GENERAL_EVENT);
dispatchEvent(new CustomEvent(target, CustomEvent.SPECIFIC_EVENT_2);
}
}
So my question is how dispatching this events will effect performance, and should i refrain from dispatching more then 1 event. The question is relevant for both cases of the dispatched event been listened to or not.
Thanks in advance
Regards Thovas