Profile cover photo
Profile photo
Matt Ray
75 followers -
The guy behind the guy behind the guy
The guy behind the guy behind the guy

75 followers
About
Posts

Post has attachment
Add a comment...

Post has attachment
Matt Ray commented on a post on Blogger.
Amron,

The "limit" continues to muddy and has grown from 5 MB since first writing. On iOS, for instance, you can grow your database to around 50 MB without much issue. On Android, it can easily get to that with no issue.

That being said, I found myself pushing things into the DB that weren't optimized for space/size. For instance, I started storing Base64 data-URIs for images in the database. While this will definitely work, you can quickly find yourself with 2 issues: sqlite does not perform well as it grows and retrievals begin to suffer causing your app to lag. Now, I typically don't notice this until it gets in the hundreds of MB, but it is something to be aware of.

Without knowing your specifics, I will throw this out there: look for ways to minimize data actually stored in the faux-tables of sqlite and consider what may make more sense to move to raw files that can be stored in the apps sandboxed directory on the device. For instance, I started storing images using the identity (primary key) generated by the sqlite table (i.e. "file_12345") and pulling the images in and out of those files instead of storing them in the database. This significantly improved load times and reduced "lag" in the app.

Potentially too preachy for what you might be doing, but just a heads-up. Thanks for stopping by and feel free to reach out for any questions you have.

Thanks,

Matt Ray
Add a comment...
Wait while more posts are being loaded