Friday, February 21, 2014

Are Core Data Fetched Properties Useful?

Marcus Zarra:

Unlike a relationship, there is no way to pre-fetch a fetched property. Therefore, if you are going to fetch a large number of entities and then desire to access the fetched property for those properties, they are going to be fetched individually. This will drastically impact performance.

Fetched Properties are only fetched once per context without a reset. This means that if you add other objects that would qualify for the fetched property after the property has been fetched then they won’t be included if you call the fetched property again. To reset the fetched property requires a call to -refreshObject:mergeChanges:.

Comments

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment