PDA

View Full Version : What's a good max size for a data store?



kencl
19 Apr 2012, 4:58 AM
Hi Folks,

I'm writing a database drill down app. The entire database is only around 500K, so I'm wondering if I can just put it into a single data store or if I need to leave the details fields on the server and pull them as needed?

A related question would be is pull data (say using an ajax call) cached or not (hopefully we have control of that).

The underlying question of course is how much memory should a dev expect a mobile device to have?

Thanks for your input!

mitchellsimoens
19 Apr 2012, 5:17 AM
I wouldn't try to transfer 500kb of data at once. It is up to your optimizations and app architecture to know how you should structure your code. For instance, if you want a nestedlist of your databases and tables then you can return those two levels. Then on tap of a table it takes you to a list of records or maybe you want to view the fields. It really just depends on the UI you are trying to achieve.

Möhre
19 Apr 2012, 5:30 AM
Localstorage is limited to 2.5 MB:
http://dev-test.nemikor.com/web-storage/support-test (http://dev-test.nemikor.com/web-storage/support-test/)

Keep your store as small as possible, otherwise it will crash ...
(http://www.sencha.com/forum/showthread.php?179106-LocalStorage-proxied-Store-crashes-on-sync()-with-3000-items)http://www.sencha.com/forum/showthread.php?179106-LocalStorage-proxied-Store-crashes-on-sync()-with-3000-items

... or become slow:
http://www.sencha.com/forum/showthread.php?191718-store-garbage-collection

Localstorage doesnt work on phones at the moment (2.0.0):
http://www.sencha.com/forum/showthread.php?194644-Localstorage-not-working-in-native-iOS-or-native-Android-application

mitchellsimoens
19 Apr 2012, 5:32 AM
Localstorage is limited to 2.5 MB:
http://dev-test.nemikor.com/web-storage/support-test (http://dev-test.nemikor.com/web-storage/support-test/)

Technically the device should prompt the user for more space.


Keep your store as small as possible, otherwise it will crash ...
(http://www.sencha.com/forum/showthread.php?179106-LocalStorage-proxied-Store-crashes-on-sync()-with-3000-items)http://www.sencha.com/forum/showthread.php?179106-LocalStorage-proxied-Store-crashes-on-sync()-with-3000-items

3,000 is way to much anyway, I would definitely not add that many records into a view like List.


Localstorage doesnt work on phones at the moment (2.0.0):
http://www.sencha.com/forum/showthread.php?194644-Localstorage-not-working-in-native-iOS-or-native-Android-application

This is only applicable to native apps, apps in the browser is not affected (yet)