I’ve recently started fresh with code for my program to give it more structure/organization and make debugging easier. I now have a hierarchy of modules and, for the most part, functions are only required in one direction down the hierarchy.
However, as expected, there are times when a happening low in the hierarchy needs to trigger something higher up, for which I use custom event dispatching and listeners. I am trying to keep these to a minimum, but I posted this to hopefully get some insight into how taxing listeners are on performance. Is each listener (even ones that are triggered singularly on occasion as opposed to almost constantly) as burdensome as, say, an object with physics would be? How many is too many (ballpark)? Any insight on this subject would be much appreciated!