开发者

Reading images (jpeg) files from SD Cards Vs SQLite DB

Does anyone have any idea (numbers?) that shows the difference between reading image files from a SQLite database vs reading it directly from the file system in a SD card. Which one is fast开发者_如何学Cer ?


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)...


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜