When I started working with Appcelerator Titanium, one of the big advantages was the built in SQLite database. This was a must in my first app – an RSS reader. I was working with thousands of articles in that needed to be queried and sorted in different ways. However, now that I am working in smaller apps, SQLite may not be the right solution.
In our current app, I am querying a web service and storing the data locally for off-line use. The local storage is minimal – only about 100 of the most recent records. Each record has about 8 fields. Initially, I setup database tables that mirrored the server. The onload method of httpClient request inserted the rows received from the server. The UI wasn’t as responsive as I liked while the database was being updated so I looked at some different options.
The amount of data I needed to store was small – only about 70k stringified JSON. Could I just use App.Properties to save it?
I ran some tests to compare the performance of save and load using App.Properties vs SQLite. Here are the results on different platforms:


The big difference is the in save – saving one stringified JSON object with App.Properties was 80x faster than inserting the 105 rows! The load was also much faster – 3x faster. This is probably due to the overhead creating tableViewRows when loading the table data.
Update Jan 27 2010: I have since found out that using BEGIN / COMMIT statements, I could have made my INSERT / Save SQLite code much quicker. See 10x Faster INSERTs in SQLite using BEGIN / COMMIT in Appcelerator Titanium Mobile.
Besides the speed benefit, the code is much simpiler when using App.Properties for both the save and the load.
Of course, your results may very depending on the amount of data (and if you need to sort or query), but App.Properties could save you (and your users’ iPhone) a ton of time.