Better Performance With Jackson and Bulk Insert

Once time, I make android application and requires pull data from web servers (Json). And then i do HttpGET to load the data from web server (big enough), after that i must insert the data into database. It takes 12-15 minutes WTF..,  how can i used the application if it takes so long?

Then i found Jackson Library And Use Bulk Insert after that it takes only 10 – 15 seconds. Very Amazing :)

After i use Jackson Library (download) and here the tutorial how to use it. It takes only 2 minutes 12 seconds. Seems good but not good enough.

After i debug, I found the problem in the inserts data into tables. I still looping using ContentValues to insert data into tables. after searching I found one articles which recommends insert data into using bulk insert. After i implement bulk insert, it takes only 10 – 15 seconds. Wow!! seems good enough.

Thanks to William Francis and Capdroid wordpress for the articles.

And Here the comparison JSON Android Compare (source) :

Jackson Comparison Data

Jackson Comparison Data

Or here (source) :

Jackson Comparison Data

Jackson Comparison Data

Cheers guys :)

Comments (0)

Leave a comment

Your email address will not be published. Required fields are marked *