Time for action – comparing the speed of database, file, and application properties
In this next example we are going to compare the speed of reading and writing data using the properties, database, and files. The example will count the time it takes to write 1000 records and then read them back again. The results of this comparison are intended to be of interest and should not be a reason to use or avoid a method. It is not fair to compare the performance of writing properties with that of a database as it suits one method far more than the other.
You can grab the source to this project from https://github.com/myleftboot/ProfileStorage. Perform the following steps to compare the speed of database, file, and application properties:
Create a new blank mobile app by clicking on File | New | Titanium Project.
Create the usual single window setup in
app.js
.Titanium.UI.setBackgroundColor('#000'); var win1 = Titanium.UI.createWindow({ title:'Storage Profiler', backgroundColor:'#000' }...