Re: NSKeyedArchiver: confusion
Re: NSKeyedArchiver: confusion
- Subject: Re: NSKeyedArchiver: confusion
- From: Jens Alfke <email@hidden>
- Date: Tue, 18 May 2010 14:41:48 -0700
On May 18, 2010, at 2:32 PM, Michael Ash wrote:
> If you need incremental modifications, you'll need to use some other
> storage/serialization strategy, such as SQLite or CoreData.
You can fake it by using an archive whose root object is a mutable dictionary. Then you can read the archive, keep the dictionary around and update its keys and values, then write it into a new archive and save the data over the file.
I’ve done this in the past and it works well for small to medium size data sets (I had something like 1,500 blog posts in it, for example.) But as it grows, it starts using more RAM and taking longer to read and save.
There are some storage systems in between this and a full relational database — Tokyo Cabinet is a good example of an on-disk dictionary.
—Jens_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden