Q: Application become too slow when i use sqlite in my application I am developing an application. In this I am using the sqlite database. 
First time I am taking the data from assets and then inserting into database. From second time onwards I am taking data from the Database. 
But first time my application is very slow. Finally my application is too slow. My question is, will the application become slow when we use sqlite in our app? and what we can do for this type of issue.
Please give me some suggestions.

A: It is possible the parser you are using for reading the XML file is working very slowly - but this shouldn't be the case as I can process a XML file with 7000 entries, with 3 entities each in around 12 seconds adding each entry to the DB.
If it is causing you problems with a Force Close / Wait dialog, run the first import in a seperate thread, not the UI one.
Another solution would be for you to load the data into a DB on the emulator, get the sqlite file from the applicaiton directory and package that with your application, then its just a question of moving the file from the asset folder to the DB folder:
Database Populating Solution for large DB's, but you could simplify the process if the DB is less than 1mb in the asset folder.

A: Another thing I did think of I forgot to mention, when you are doing the initial inserts, are you inseting each record as you find it? If so you may find it faster to use a transaction:
db2.beginTransaction();
try 
{
    // Perform logic loop and perform each insert:



    db2.setTransactionSuccessful();
}
finally 
{
    db2.endTransaction();
}

