How many event listeners and objects can corona handle?

I will apologize first because I’m at work and don’t have any code to show, but I thought I could post anyway because its not necessarily related to my code.

I was wondering how many event listeners and or object can I have within one lua file, before it would start to effect performance.

I’ll be first to admit that I am not the most technical guy, so my wording of that may not be on point, but I am working on a game and have come to find out that I may have up to 25+ objects that all would have their own RunTime event listener going in the background to make sure the locations of objects are where they need to be.

Does anyone know if there is a recommended limit to stay under to ensure performance and quality does not lower?

Thanks

25 isn’t going to be a problem.  

You can have thousands of event listeners.  The real cost comes in the code that executes as a result of a listener.  i.e. If you’re doing a lot of calculations for each listener  you’ll start to see issues when you have hundreds to thousands (it is all a matter of degree).

That said, 25 … 50 is unlikely to be a problem.

PS - Of course, the best way to find out is to experiment on some devices.

Thanks man, I appreciate the response :slight_smile:

25 isn’t going to be a problem.  

You can have thousands of event listeners.  The real cost comes in the code that executes as a result of a listener.  i.e. If you’re doing a lot of calculations for each listener  you’ll start to see issues when you have hundreds to thousands (it is all a matter of degree).

That said, 25 … 50 is unlikely to be a problem.

PS - Of course, the best way to find out is to experiment on some devices.

Thanks man, I appreciate the response :slight_smile: