I am currently developing an app that help students to practice past exam questions for a matriculation exam. The catch here is to beat other apps already doing this by making questions and solutions of the app totally available offline.
My challenge now is the data is large. About #12,000 questions/solutions approximately. Where do I put this data?
Can I save it as a JSON file in the front end?.. And would it not affect performance? Apart from having to upload an heavy app file to app store.
Are there other possible solutions for making these questions/solutions available offline on ionic app. Thanks
I’ve used Ionic Storage (with only the IndexedDB-driver) to store a whole JSON-tree.
Instead of fetching the data via HTTP, I just fetch it from the database and do the filitering locally.
I guess this isn’t the best solution, but in my case, it did the trick
This sounds much like what I want. Because there will be no crud operations. Only read operations. And any update will be done manually (annually) after recurring exam.
The question now is, how large was ur JSON file? Can indexedDB store as much?
Thanks a lot, one more thing please, from your answer, it means one can store data in separate files, like different batches? Just incase I want to have storage for different subjects… And I hope u wud be helpful if I have difficulties while implementing… thanks
I have stringified a large object which then gets CryptoJS.AES() encrypted.
Any limit expectations ypu see?
It’s these edge use-cases that throw a spanner into our assumptions.
I had exactly this problem. I had a payload that needed encryption using the exact same library you mention. The output was approximately a 20K long encrypted string.
For whatever reason, there were android phones that would simply freeze when doing an SQL lite write using local forage as a front end wrapper. It wasn’t a transaction freeze - it would just get locked and required an app kill. I just couldn’t replicate it on my android phones but some of my app users just could not use my app. Given that I couldn’t debug, and the users were not really super technical, so asking them to monitor adb logs was a no go, I gave up and used indexed DB for android and sqlite for iOS in my order preferences. Given I couldn’t debug, I can’t really say if it was a core library problem or a problem with my code. No problem in iOS though.