O'Reilly logo

Core Data in Swift by Marcus S. Zarra

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Access Patterns

Improving performance within Core Data isn’t necessarily only about the repository and order of loading the data. We can do a number of things within the user interface to help performance as well.

Searching the repository can be absolute murder on performance. Whether we’re searching at the request of the user or performing a search in the background, we need to be very careful to avoid impacting the performance of our application.

Order Is Important

Just like any conditional, the order of the logic is important. Simple equality is faster than inclusions such as in, contains, and so on. When building the predicate, try to order the logic from left to right, simple to complex. This process allows Core Data to fail quickly and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required