Loading libraries

Hi

I would like to know if there is performance benefit in this case…
Global library loader in main.lua, when it loads library it stores it in table… After that I load libraries from with this library loader and if that library has been loaded before it returns stored library. In a lot of my libraries other libraries are re-used.

against…

requiring each library with require all the time…

Thanks in advance… :slight_smile: [import]uid: 28742 topic_id: 15362 reply_id: 315362[/import]

space/memory management on a mobile device

cheers,

?:slight_smile: [import]uid: 3826 topic_id: 15362 reply_id: 56751[/import]

this answer only confuses me :smiley: could you be more specific on what you are trying to say? :slight_smile: [import]uid: 28742 topic_id: 15362 reply_id: 56824[/import]

everytime you load a library in memory, you are using up space/memory, so loading all irrespective of whether you need it or not is wasting space, however if you load/unload and use as required, you will be managing space better.

so the advantage / disadvantage of this or the performance benefit would be space/memory management on the mobile devices.

now why would you have several libraries that would serve no common purpose?

cheers,

?:slight_smile: [import]uid: 3826 topic_id: 15362 reply_id: 56826[/import]

Thanks :slight_smile:

and they serve common purpose :slight_smile: [import]uid: 28742 topic_id: 15362 reply_id: 56829[/import]

if they serve a common purpose, then why would you have multiple module libraries, they can all be bundled into one library.

cheers,

?:slight_smile: [import]uid: 3826 topic_id: 15362 reply_id: 56831[/import]