PDA

View Full Version : Performance issue loading JSON data



ahaeusse
5 Feb 2012, 2:46 AM
Hi,

i recently started playing around with sencha touch.
I am planning to develop an app similar to the oreilly example app.
Loading the app on my iphone in safari takes about 30 seconds till i see the session list.
I thought tourning this app in a "real" iphone app using phonegap would speed up things a bit.
But it still takes about 30 seconds for the session list to load.

The data is stored in a json file that is processed every time the app starts.
Is there better/faster way to store data in an app? The data doesnt need to be loaded from a webservice.
It is in a local file within the app.

thanks for your help
alex

mitchellsimoens
5 Feb 2012, 10:17 AM
How large is the JSON?

ahaeusse
5 Feb 2012, 10:55 AM
Its the original data.json that comes with the oreilly example.
Its 200kb

What i would liken todo is process the data once and store it on the phone so the next time you start the app the json is not processede again.

ahaeusse
6 Feb 2012, 1:24 PM
No one any ideas how i can speed up things?

Or store data in a better way than in json format?

digeridoopoo
8 Feb 2012, 5:31 AM
Surely you can speed this up using cache manifest?

There are a few great posts on how to do that here...there might be one written by tomalex? I forget...

:-)

ahaeusse
8 Feb 2012, 6:16 AM
Thanks for your reply.

cache manifest will not work in this case.
All files are stored in the app (no files need to be loaded from an external source).

As i wrote earlier i'm planning an ios app using phonegap and UIWebview does not support the manifest tag.
I think i will give the sqllite proxy by tomalex a try and store my data in a database, maybe that speeds things up.