An-droid
An-droid

Reputation: 6485

Optimisation sqlite application statup

My application download datas from webservice JSON at start up. Then i need to store those data in an sqlite database.

The operations are pretty heavy on the system, application start up and list loading is too sloww :(

Here is how i do things :

Download is made in threads since it's network oparations, sql operations are on mainthread since i need it for the list

What can i improve for better performance ?

Upvotes: 0

Views: 56

Answers (1)

Lena Bru
Lena Bru

Reputation: 13947

on very first run, nothing to do (after app installed) ask user to wait with an alert dialog, after that, make those operations in a service, independent of your application, so that by the time the user opens the app, the data is already there, no need to download again

also you could download the data in small chunks, and display to the user what you have already downloaded, and tell him there may be more

Upvotes: 1

Related Questions