• 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 Fetches + Transient Properties + NSPredicateEditor = Sadness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness


  • Subject: Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness
  • From: "Melissa Turner" <email@hidden>
  • Date: Mon, 20 Apr 2009 11:23:48 -0700 (PDT)
  • Importance: Normal

On Mon, April 20, 2009 11:02 am, Jerry Krinock wrote:

> Makes me wonder why NSFetchRequest even supports a predicate, since
> its predicate has all these limitations and is supposedly more
> expensive when compared to fetching all objects and then using -
> [NSArray filteredArrayWithPredicate:] ?  It would have saved me a day
> on the learning curve had it not been there for me to hang myself with.
>

filteredArrayWithPredicate: is only an option if you have a relatively
small dataset. There's overhead to loading an object into memory, both in
terms of memory and CPU cycles.

Doing filtering in memory is a code smell. It generally signals that
you're fetching against the wrong entity, or that your model needs to be
tweaked to be more efficient.

+Melissa




_______________________________________________

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: 
 >Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness (From: Jerry Krinock <email@hidden>)
 >Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness (From: Mike Abdullah <email@hidden>)
 >Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Quartz Comp on iPhone
  • Next by Date: Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness
  • Previous by thread: Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness
  • Next by thread: Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness
  • Index(es):
    • Date
    • Thread