• 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: Core Data or not
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data or not


  • Subject: Re: Core Data or not
  • From: Trygve Inda <email@hidden>
  • Date: Sat, 06 Aug 2016 12:04:43 -0700
  • Thread-topic: Core Data or not

> To do it as one fetch you can set your predicate (or a sub predicate)
> as: [NSPredicate predicateWithFormat:@"%K in %@", primaryKey, keys] where
> primaryKey is the name of your ID property, and keys is an array of ID
> values which are "interesting" (as defined by the rest of your code).
>

Thanks for this. Any idea how efficient this is?

Currently I keep a dictionary of my objects which is keyed on the
"interestingField" (a UUID). To gather a user-defined set of them I use a
loop with something like:

for (NSString* uuidString in mySetOfUUIDS)
   [collectedArray addObject:[dict objectForKey:uuidString]];

I wonder how fast each would be if I were collecting 500 out of 5000
objects?





_______________________________________________

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: 
 >Re: Core Data or not (From: Ryan Dignard <email@hidden>)

  • Prev by Date: Re: Core Data or not
  • Next by Date: Re: Core Data or not
  • Previous by thread: Re: Core Data or not
  • Next by thread: Re: Core Data or not
  • Index(es):
    • Date
    • Thread