Faulting

Firing faults individually is one of the most common, if not the most common, cause for the poor performance of Core Data applications. Faults are a double-edged sword that can make great improvements to the speed and performance of our applications or can drag the performance down to the depths of the unusable. The single most valuable performance improvement we can make to a Core Data application is to make sure we’re fetching only the data we need when we need it. If we fetch too little, our application will feel unresponsive. If we fetch too much, our application will stall and potentially be killed by the operating system.

Orders of Magnitude

Disk access is significantly slower than accessing memory. The times measured for each ...

Get Core Data in Swift now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.