• 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: crashes loading saved file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: crashes loading saved file


  • Subject: Re: crashes loading saved file
  • From: Jens Alfke <email@hidden>
  • Date: Mon, 28 May 2012 22:56:45 -0700

On May 28, 2012, at 10:51 PM, I wrote:

> In general, look at your graph and figure out the minimum number of object relations you need to archive to reconstruct its structure. Then archive only those, and recreate the rest at load time.

I just had another thought. Are you using linked lists? I suspect those are rather bad for the unarchiver, since it's likely to end up recursing all the way down the list, resulting in O(n) stack depth. That is, during -initWithCoder: for an item in the list, it'll be asked to unarchive the "next" property, which ends up calling -initWithCoder: for the next item in the list, and so on until it hits the end and can finally unwind the stack.

If so, it would be a lot more efficient for the archiver if you stored the list as an NSArray, since that allows it to instantiate one item at a time (breadth-first instead of depth-first, basically.)

—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: 
 >crashes loading saved file (From: James Maxwell <email@hidden>)
 >Re: crashes loading saved file (From: Fritz Anderson <email@hidden>)
 >Re: crashes loading saved file (From: James Maxwell <email@hidden>)
 >Re: crashes loading saved file (From: Roland King <email@hidden>)
 >Re: crashes loading saved file (From: James Maxwell <email@hidden>)
 >Re: crashes loading saved file (From: James Maxwell <email@hidden>)
 >Re: crashes loading saved file (From: Quincey Morris <email@hidden>)
 >Re: crashes loading saved file (From: James Maxwell <email@hidden>)
 >Re: crashes loading saved file (From: Quincey Morris <email@hidden>)
 >Re: crashes loading saved file (From: James Maxwell <email@hidden>)

  • Prev by Date: Re: crashes loading saved file
  • Next by Date: Re: crashes loading saved file
  • Previous by thread: Re: crashes loading saved file
  • Next by thread: Re: crashes loading saved file
  • Index(es):
    • Date
    • Thread