I am creating an extension for my game that contains lots of variables and game info and does some extensive calculations on the data.
The game has two main frames that switch a lot during the game (approx 3 times a minute) and those two frames read the data from the extension and write to it (to RAM, not to disk).
Since I have read that our extensions can't be global (in help file: OEPREFS_GLOBAL - "this option has no effect on extension objects"), there was only one solution...
That is to share the data by saving the file to disk at the end of the frame and then load it at the beginning of another frame.
This is working as it is supposed to work, but the problem is that the file saved is about 50 kb, so everytime frames switch, 100 kb is written and read from the disk. If that happens 3 times a minute that means that disk is reading and writing too often. Since I want to spare the disk unneccessary r/w operations, is there a way to make the data global throughout those two frames?
Porting all data to some of the existing arrays/storage objects is not an option because there are about 3000 different integers to save (and around 200 floats)... I don't think that would be a smart idea.