Does it make a difference from the performance perspective to split a data module into several?

Hi,

I was just wondering the following does make a difference.

Lets say you are running different scenes at once and they all get and share data by requiring a module called mod_data.

This modules contains npc, event, music and other data. Does the fact that not all the scenes do need access to all the data contained in mod_data make a difference to the performance. Would it be better from the performance perspective to have a single data module for the different groups of data saved like npc and music data?

Hi @andre.m,

I would venture to say that it might make a small difference, but not a vast difference. But if you’re very picky and very demanding about performance (I tend to be) then I would suggest you only get the data you need in the scene which needs it, not all of the data… it’s just a little wasteful to have a bunch of data loaded that is not ever being accessed. Again, it’s probably not going to have any vast performance impact, but in the world of mobile, it doesn’t hurt to be overly concerned about memory/performance.

Brent

Thanks a lot Brent! This really helped me a lot since I am also one of those very picky persons :wink:

By the way. Is there an internet site or book (preferable internet site) about memory/performance you would recommend?

Hi @andre.m,

This guide should be useful to you… it’s our general summary of ways to improve performance in any Corona-build app:

https://docs.coronalabs.com/guide/basics/optimization/index.html

Take care,

Brent

Hi, got it :slight_smile:

Thanks a lot for the help. Problem solved!

Hi @andre.m,

I would venture to say that it might make a small difference, but not a vast difference. But if you’re very picky and very demanding about performance (I tend to be) then I would suggest you only get the data you need in the scene which needs it, not all of the data… it’s just a little wasteful to have a bunch of data loaded that is not ever being accessed. Again, it’s probably not going to have any vast performance impact, but in the world of mobile, it doesn’t hurt to be overly concerned about memory/performance.

Brent

Thanks a lot Brent! This really helped me a lot since I am also one of those very picky persons :wink:

By the way. Is there an internet site or book (preferable internet site) about memory/performance you would recommend?

Hi @andre.m,

This guide should be useful to you… it’s our general summary of ways to improve performance in any Corona-build app:

https://docs.coronalabs.com/guide/basics/optimization/index.html

Take care,

Brent

Hi, got it :slight_smile:

Thanks a lot for the help. Problem solved!