Thursday, February 7, 2013

Core data lazy loading

Apple's explanation on Core data lazy loading.

When you execute a fetch, Core Data fetches just instances of the entity you specify. In some situations, the destination of a relationship is represented by a fault. Core Data automatically resolves (fires) the fault when you access data in the fault. This lazy loading of the related objects is much better for memory use, and much faster for fetching objects related to rarely used (or very large) objects. It can also, however, lead to a situation where Core Data executes separate fetch requests for a number of individual objects, which incurs a comparatively high overhead.

Source - https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CoreData/Articles/cdPerformance.html

No comments:

Post a Comment