Reputation: 2258
I have about 20,000 NSDictionary
s. Each dictionary contains three NSString
s. 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 NSDictionary
s 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?
Upvotes: 0
Views: 249
Reputation: 4289
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.
Upvotes: 0
Reputation: 1795
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.
Upvotes: 2