• 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
faster deep copies?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

faster deep copies?


  • Subject: faster deep copies?
  • From: James Maxwell <email@hidden>
  • Date: Wed, 13 Feb 2013 18:07:24 -0800

I've run into a situation where I really need a deep copy of an object. I've implemented this using Apple's recommended approach with NSKeyedArchiver/Unarchiver, and it's nice, simple, and functional. But it's also pretty darn slow -- as in a clear, subjectively apparent performance hit.
Has anybody had to find a way around this, and if so, what did you do? Or if anybody just has a nice, creative thought about another way of doing it, I'd love to hear about it.

The object(s) being copied are custom classes, and there's a chance I may be able to get away with copying only certain properties (i.e., rather than archiving the entire graph from the root object), so I'll look into making a "deepCopy" method that's more selective. But I'd appreciate any thoughts in the meantime.

Thanks in advance.

J.
_______________________________________________

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

  • Follow-Ups:
    • Re: faster deep copies?
      • From: Graham Cox <email@hidden>
    • Re: faster deep copies?
      • From: Tom Davie <email@hidden>
    • Re: faster deep copies?
      • From: Uli Kusterer <email@hidden>
    • Re: faster deep copies?
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Re: iOS Document Interaction Technology
  • Next by Date: Re: faster deep copies?
  • Previous by thread: Re: iOS Document Interaction Technology
  • Next by thread: Re: faster deep copies?
  • Index(es):
    • Date
    • Thread