Reputation: 51
I am making an android app which requires 1200 records to insert and then fetch. I am using sqlite as back end. Everything is working fine but app takes lot of time to load the data at very first time for new installation. I am using SQLiteOpenHelper class to insert data. Please suggest ways to reduce the time to load the data at very first time.
EDIT : I resolved my problem:) Here is how? My app was taking much time because, I was inserting all the 1200 records at a time. Now i changed my code such that it should insert only required data one at a time so it saved my lot of time.
Upvotes: 0
Views: 1643
Reputation: 150
Use transactions as explained in this answer and make sure that you are only creating one connection to the SQL database for the transaction(s)
There should be a significant speed increase
Upvotes: 1