1

I'm thinking about switching from titanium developer to phonegap mainly because there is virtually zero support with titanium (their q/a section often has questions asked nearly a year ago without any answers) and the android emulators are beyond slow to launch.

My only concern is the lawnchair db performance in phonegap. I've been using sqlite in titanium and it works great with datasets of a few thousand records.

Does anyone know how well lawnchair performs in phonegap with thousands of records?

5
  • Can't you just use sqlite with phonegap?
    – Pointy
    Commented Oct 31, 2010 at 15:24
  • Do we even have databases that can't easily handle a mere few thousands records nowadays? Commented Oct 31, 2010 at 15:25
  • 1
    I briefly looked over lawnchair and it's entirely json based and I didn't see any documentation off hand regarding indexes hence the question. I am seeing some mentions of sqlite now, I'll check that out. I didn't think it was supported on all devices though.
    – Joe
    Commented Oct 31, 2010 at 17:03
  • I'm getting this: Uncaught Error: QUOTA_EXCEEDED_ERR: DOM Exception 22 DOMStorageAdaptor.saveDOMStorageAdaptor.js:52 Lawnchair.saveLawnchair.js:33 (anonymous function) When I try to save thousands of objects. Using DOM adaptor. Any one else got this to work? Commented Apr 17, 2011 at 20:45
  • That's when saving thousands of records at once. I tried saving just the first element of my array and it worked, so I think I'll have to save and load by individual elements instead of large arrays. Commented Apr 17, 2011 at 21:06

2 Answers 2

8

Lawnchair is optional with PhoneGap projects - it doesn't depend on PhoneGap, nor vice versa. It's a thin wrapper around the native storage APIs for each platform, including SQLite. Because it doesn't do a whole lot, there isn't much of a performance hit - the benefit is that you have a unified API to lots of different data stores.

One thing to note is that Lawnchair is a strictly key value based store - with the SQLite adapater, for instance, it sets up a single Lawnchair table with two fields (key and value). If you have a large relational dataset, you may want to use the SQLite APIs directly rather than switching to a key-value interface.

1

LawnChair is supported on all devices I believe.

it is json based storage, and you can configure the filestore based on specific platform, take a look at the git hub page there are sqlite adapters

A final comment on zero support on titanium... PhoneGap has a very active user community, but the API and support is not as robust as you will find in Titanium. I use both... I think each one has strengths and weaknesses, but the grass is not always greener on the otherside

1
  • about the biggest plus for titanium is synchronous database calls, I've been looking hardcore into db options for phonegap and I'm basically limited to the sqlite which is async = nightmare converting an app from titanium to phonegap.
    – Joe
    Commented Nov 1, 2010 at 2:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.