Greetings!
Due to the amount of data, accessing (DBUtils) and processing* my SQLite DB is causing an ANR warning on some devices.
While there is some code optimization to be done, I would like such operations to be performed in a background thread, as recommended in this article: http://developer.android.com/training/articles/perf-anr.html
What would be the best approach?
- Move everything into a Service Module?
- Use the Threading Lib?
- Rewrite DBUtils to asynchronously access the DB?
- Other?
Rewriting DBUtils doesn't seem plausible to me because I also want the data processing to be done in the background.
*Initializing a fairly amount of variables and arrays based on the data loaded from the DB.
Due to the amount of data, accessing (DBUtils) and processing* my SQLite DB is causing an ANR warning on some devices.
While there is some code optimization to be done, I would like such operations to be performed in a background thread, as recommended in this article: http://developer.android.com/training/articles/perf-anr.html
What would be the best approach?
- Move everything into a Service Module?
- Use the Threading Lib?
- Rewrite DBUtils to asynchronously access the DB?
- Other?
Rewriting DBUtils doesn't seem plausible to me because I also want the data processing to be done in the background.
*Initializing a fairly amount of variables and arrays based on the data loaded from the DB.