I was wondering as I am now writing app using SQLite database also sending some informations between activities. What is faster and better:
I am only talking about option when object is only read . Now write, edited or in any other way modified.
What is you opinion?
You'd need to benchmark to verify, but I suspect that using a Parcelable is faster. It can be done entirely in memory and doesn't need to flush to storage. Writing to SQLite requires that the data be flushed to wherever the SQLite data base is stored, which can take a significant amount of time. Reads can also be slow. (This is why StrictMode
mode will normally alert about SQLite writes on the UI thread.)
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.