core dataperformancetips

3
TIPS FOR CORE DATA

Upload: manjula-jonnalagadda

Post on 07-Aug-2015

103 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Core dataperformancetips

TIPS FOR CORE DATA

Page 2: Core dataperformancetips

• Store big files (>1MB) externally

• Store intermediate files (>=100kb < 1MB) in a relationship.

• Store small files (<100kb) internally

• Entity inheritance can be a performance hinderance

• Search properties can be helpful

• Follow object model

• Separate commonly used data form the rest

Page 3: Core dataperformancetips

• Retrieve NSManagedObjectIDs and retrieve properties from that [fetchRequest setResultType:NSManagedObjectIDResultType];

• Retrieve only property values

• Use batch sizes

• Prefetch relationships

• Perform fetches on background thread