SQL or localstorage

edited February 2012 in Enyo 1.0
My Enyo 1.0 application (currently for iOS and webOS) uses localstorage to save some data and an SQL database (I'm using onecrayon's database wrappers) to save other data. The SQL database is loaded, at first run, from a JSON containing 7000 rows with four fields each. My application queries the SQL database to find specified records among those 7000 rows.

Would there be any performance benefit of getting rid of the SQL database and replacing it with a second localstorage? I understand localstorage would be synchronous and doesn't index. However, is the SQL database a significant drain on system performance? I've noticed my application is a little sluggish on iOS (but not at all on webOS).

Comments

  • iOS extensively uses SQLite for the CoreStorage API, so I think it's fairly well optimized. However, there will be delay in using it, since you won't get results until WebKit considers the system to be idle.
  • It's more likely your app looks sluggish because the UI widgets in Enyo 1.0 is only really optimized for the TouchPad (and desktop Chrome), and it's sluggish on other mobile devices. SQLite has pretty good performance in general, both on webOS 2.x and 3.x, and in most other web platforms.
Sign In or Register to comment.