views:

70

answers:

2

Does anyone have any idea (numbers?) that shows the difference between reading image files from a SQLLite database vs reading it directly from the file system in a SD card. Which one is faster ?

Thanks.

A: 

I think reading from file system directly is faster, because reading from database includes reading data from database file. But, it greatly depends of image file size. Usually, database reads data from disk (or from SD Card in your case) using pages. Reading from file system may be less effective if file size is small.

But of course, you need to prototype and test it on your data similar to real data suspecting in system, this will get you only one true answer.

STO
A: 

Reading from the file system is always faster than reading from a DB unless the DB can cache the file in memory (don't think Android phones have enough memory for sqllite to do this)...

kenyee