Question

I have about 20,000 NSDictionarys. Each dictionary contains three NSStrings. The dictionaries are organized in a folder-file like structure, i.e., I have about twenty main groups, and in each group I have another twenty sub-groups. Within each sub-group, I have a list of the NSDictionarys that belong in that sub-group.

This data is all static, though from time to time it will be updated by downloading a newer version of the data.

The user won't necessarily interact with this data every time they use the app, though the main 'group' will always be displayed during each use of the app.

So my question: what is the best way to store this data and then to load it when necessary? At first I was thinking of just putting it all in a plist and then creating an NSArray from this plist when the app opens, but I'm wondering if that will be slow. Since the user may not ever interact with this list, maybe an alternate approach is better?

Was it helpful?

Solution

Try looking into SQLite database structure. I think this will be much quicker for larger amounts of data like what you're using. There are plenty of tutorials online showing you how to set it up and introducing you to the various parts of it.

OTHER TIPS

Also take a look at non-SQL-based databases like Tokyo Cabinet. If you don't need advanced SQL queries they are faster and require less resources.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top