• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSKeyedArchiver: confusion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >NSKeyedArchiver: confusion (From: Matthew Weinstein <email@hidden>)
 >Re: NSKeyedArchiver: confusion (From: Jens Alfke <email@hidden>)
 >Re: NSKeyedArchiver: confusion (From: Matthew Weinstein <email@hidden>)
 >Re: NSKeyedArchiver: confusion (From: Michael Ash <email@hidden>)

  • Prev by Date: Re: NSKeyedArchiver: confusion
  • Next by Date: Re: NSTask and piped commands
  • Previous by thread: Re: NSKeyedArchiver: confusion
  • Next by thread: singleton design pattern
  • Index(es):
    • Date
    • Thread