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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to