Is it better to save bitmaps to Sqlite Databse or Files handling its paths in Database ? - Android

213 views Asked by At

Is Converting bitmaps to byte[] and saving it to Database better performance and management or saving the bitmaps to Files and handling the paths in the Database ?

By better I mean as performance and management.

I have started a new application and i want to know if anybody has faced such a problem, and which solution is preferable for Android apps ?

Note: I am using Greendao as ORM.

1

There are 1 answers

0
j2ko On

I suggest to use files and manage them using some library like Picaso and storing paths in DB. Android have a lot of stuff related to optimization of bitmap usage by applying caching, LRU etc. You can be very specific in configuration and optimizing it. In addition to that - sqlite (as GreenDAO built on top of it) is in-memory database, you will simply run out of memory.