开发者

Android performance Maintain json files or an sqlite database?

开发者 https://www.devze.com 2023-02-10 10:44 出处:网络
Hello this is probably a typical question but i cant seem to find a clear answer? I have a backend application that will serve data in json form.

Hello this is probably a typical question but i cant seem to find a clear answer?

I have a backend application that will serve data in json form.

The data will be in form [code] [name].

The data sets might vary from 100-2000 rows.

What would be best...

Store directly these json responses as 开发者_StackOverflowfiles and then parse them if they exist? Or store them in the android database?

In each case the data does not change that often maybe 1 per week.

Which way would be the faster and which more efficient?

Thanks


I think database is much more preferable way here. Text rows even in quantities like 2000 on smart phones better not to be handled in text I think.


I'd go for the Sqlite db too, I'm quite sure that it's much faster than using basic file i/o.

0

精彩评论

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