• 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: Cleaning "garbage" in Core Data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Cleaning "garbage" in Core Data


  • Subject: RE: Cleaning "garbage" in Core Data
  • From: Squ Aire <email@hidden>
  • Date: Sun, 16 Aug 2009 15:34:39 +0000
  • Importance: Normal

For now, just imagine that a set of valid (non-garbage) keys are stored in a ValidKeys entity (with a single attribute called 'key' of type string). Or just imagine some global array storing those keys if you like that better.

Now, imagine that we have chosen a bunch of employees to "clean up" (say using that possibly bad randomness approach I suggested). What we have to do first is fetch all ValidKeys managed objects. Then, we will want to loop through the chosen employees, and for each employee loop through its userInfo dictionary and get rid of all key-value pairs having keys that are not within the fetched ValidKeys managed objects.

Surely it is much more efficient to do this with a bunch of employees at once, rather then doing it for a single employee one by one during didTurnIntoFault, wouldn't you agree?


> I believe many of us would be interested to know how you determined
> that cleaning it up "on the go/before persisting" degrades
> performance. Seems surprising to me.



--.
_________________________________________________________________
Drag n’ drop—Get easy photo sharing with Windows Live™ Photos.

http://www.microsoft.com/windows/windowslive/products/photos.aspx_______________________________________________

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: Cleaning "garbage" in Core Data
      • From: "I. Savant" <email@hidden>
References: 
 >Cleaning "garbage" in Core Data (From: Squ Aire <email@hidden>)
 >Re: Cleaning "garbage" in Core Data (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: Cleaning "garbage" in Core Data
  • Next by Date: Re: Cleaning "garbage" in Core Data
  • Previous by thread: Re: Cleaning "garbage" in Core Data
  • Next by thread: Re: Cleaning "garbage" in Core Data
  • Index(es):
    • Date
    • Thread