Hi, I am working on n Ionic app that uses localstorage for offline data store.
There are about 30 templates in this app. Also any number of users can be added. Local storage is used to store 3 things mostly. First the primary information about users and last signed in user. Second latest notifications of the users to show on app start. Then user can refresh them from server. And also the Chats of the user .
My problem is that recently there was memory crash issue on iOS 8 both on iphone and ipad. In process to track down the problem’s cause I disabled the local storage , then the memory warning didn’t appear. So i am assuming local storage may be the cause of the problem. Also I think size of localstorage is not an issue. I used this code
unescape(encodeURIComponent(JSON.stringify(localStorage))).length); to find the size of local storage. It never goes beyond 2.5MB. The major problem maybe the excessive manipulation on the localstorage data.
My query is should I use SQL Lite for this purpose. If yes what are the best practices to use with cordova app. Would the use of SQL lite can cause more computional overhead ??
Please provide your suggestions.