In my android application which has preprocessing step at the start of the application which loads data needed by the app from database. The size of SQLite database is some 40 MB. The application takes a lot of time to preprocess the data from the database so an user has to wait for some 1 minute time for using the application. Is there any way/ways by which I can improve the performance of my app? The DB operations are mostly of select type like this:
Cursor mCursor = myDataBase.rawQuery("SELECT SUM(TimeTaken) as _time from AssessmentAttempted where AssesmentId IN(" + assessmentIds + ")", null);
To improve the performance on the preprocess phase create a SQL transaction for all operations made against the DB. This will decrease especially the insert and update times.