Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

File System Vs DB

The reason I ask here is I like the answers to be public.

Has anyone done any benchmarks for the file system vs DB

Say 1000 rows in DB or JSON or XML. How long to be loaded into object

If anyone has any other benchmarks they think would be good.

I'd like to start using the DB seeing as I'm watching the nifty Native UI Videos at the moment, However it'd be good to see How much better it would be.

— asked June 27th 2010 by Ryan Tregea
  • android
  • benchmark
  • database
  • filesystem
  • iphone

3 Answers

  • my experiences are as follow:

    reading a file, reading from a iSQL-DB is quite fast on all devices (at least the apple ones, can't speak for android phones), the bottleneck can be found in appcelerators code for displaying tablerows. rendering 1000 rows for me took about 9 secs on a iPhone 3GS and about 20+ secs on a 3G. i heard that the devs are working on making this faster at the moment (there is also a bug with iOS4 that slows down this process compared to 3.x)

    this was measured when using "custom" tablerows, i guess it would be faster, if using the basic method for creating tableview data, if you have the flexibility to use a simple tableview-design

    — answered June 27th 2010 by Christian Sigl
  • Mmmm. Yeah i'm having tableview performance issues as well, Perhaps i've got too many images in the view, however I can't get away from that, there needs to be 6 - 8 images per row.

    I only have 6 rows at the moment and it's shocking, I want to understand setting the className better, apparently it saves templates or something.

    — answered June 27th 2010 by Ryan Tregea
  • Actually i Appear to have overcome the tableview issue, I wrap each row in a view and then just load the view into the row.

    Performance is fine then. No changes to code, Just wrap a view in it, tie a bow :D

    var row1 = Titanium.UI.createTableViewRow({height:100});
    var row =  Titanium.UI.createView({height:100,width:300});
    row1.className = CustomData[i].Type;
    — answered June 27th 2010 by Ryan Tregea
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.