The Difference Between Light and Heavy Migrations

There are two types of migrations for Core Data: light (also referred to as lightweight or inferred) migration and heavy (also referred to as manual) migration. When we’re working with SQLite persistent stores, the difference between these two types of migration is significant.

A light migration of a SQLite persistent store occurs within the SQLite file itself. There are no objects loaded into memory, and therefore the memory requirements of the migration are quite low. In addition, since the migration is occurring within the database file, it is very fast. While the size of the database file still affects the speed of the migration, a light migration of a large database will still be remarkably ...

Get Core Data in Objective-C, 3rd Edition 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.