• 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: archive only what changed?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: archive only what changed?


  • Subject: Re: archive only what changed?
  • From: "Joan Lluch (casa)" <email@hidden>
  • Date: Mon, 7 Jul 2008 19:03:11 +0200

Core Data does a really good job at what you are describing, when using SQLite as a persistent store, although this may not be what are you looking for.

The only other approach to this that I think of is to cache the objects that change in your model and then only store these objects either directly or by tweaking the NSCoding protocol methods in your model, but then your code will have to be clever enough to know what files or parts will have to retrieve if a revert operation is requested. However, it looks to me too complicated or worthless to follow that route.

If storing your model is really a performance issue, then you might consider going to Core Data and SQLite stores.

Joan Lluch

El 07/07/2008, a las 16:13, Randy Canegaly escribió:

I have an application whose data model is an NSMutableArray with elements that could be pointers other NSMutableArrays, much like what you would navigate with a NSIndexPath. I am using NSKeyedArchiver to archive the data model to a file. Right now I archive the entire top level array object (and therefore all its parts) to the file using archiveRootObject:toFile.
Is it possible to archive only the portion of the data model that changed rather than the entire thing every time? I need the entire data model to be archived so that it can be reloaded when the application starts but for performance reasons I am interested in seeing if it's possible upon a change to the data to only re-archive the small part that changed.
_______________________________________________


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

_______________________________________________

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: 
 >archive only what changed? (From: Randy Canegaly <email@hidden>)

  • Prev by Date: NSButton in a NSPanel's top-right corner?
  • Next by Date: Re: NSButton in a NSPanel's top-right corner?
  • Previous by thread: Re: archive only what changed?
  • Next by thread: Being notified of current document change
  • Index(es):
    • Date
    • Thread