I have a fairly large json file that is compiled on my server from php, the CMS is a custom wordpress backend and there is server-side functionality that creates the json file and zips it. My app checks if it needs it’s data updating on startup with a small timecode check and then downloads, unzips and decodes this json file if needed.
This works well and as expected, the actual download is fast enough because it’s zipped, but due to it’s size the process takes far too long and causes a loading delay that feels buggy. This is due to the json decode more than anything else and the delay happens every time the app starts up because of this.
My question :
Is there a nice way to save out a lua table as a file on my server straight from a php array which I can download to my app’s documents directory and then simply require it rather than loading a json file and decoding it every time? The reason I want this is because I suspect it would significantly speed things up.
I do not want to use SQLite because I have already got things how I want them with a custom php array and I also know that SQLite will be even slower on the corona side.