简体   繁体   中英

Which is faster retrieving data from internet or from database in android app?

I am creating a quiz app which is for now retrieving list of data objects from retrofit and as data is asynchronous , it takes 2 or 3 seconds to retrieve it.

But there are apps which are using databases instead of retrieving whole sum of data from internet. As i have never worked with android sq-lite which is better for performance and will produce efficient results?

What are your opinion do i have to change my app and work with sq-lite instead of retrofit.

为了获得更快的数据,您可以使用改造 REST API 进行实时存储,使用 Room 数据库进行本地存储,而不是使用 SQLite 数据库。

Getting value from local database is faster. But when working online you have other benifits. You have to figure out what fits you better.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM