Database Reference
In-Depth Information
Chapter 9: Measuring and
Boosting Performance
By Matthew Morey
In many ways, it's a no-brainer: You should strive to optimize the performance of
any app you're developing. An app with poor performance will, at best, receive bad
reviews and, at worst, become unresponsive and crash.
This is no less true of apps that use Core Data. Luckily, most implementations of
Core Data are fast and light already, due to Core Data's built-in optimizations, such
as faulting.
However, the flexibility that makes Core Data a great tool can also allow you to use
it in ways that negatively impact performance. From poor choices in setting up the
data model to inefficient fetching and searching, there are many opportunities for
Core Data to slow down your app.
You'll begin the chapter with an app that is a slow-working memory hog. By the end
of the chapter, you'll have an app that is light and fast, and you'll know exactly
where to look and what to do if you find yourself with you own heavy, sluggish
app—and how to avoid that situation in the first place!
Getting started
As with most things, performance is a balance, a balance between memory and
speed. Your app's Core Data model objects can exist in two places: in random
access memory (RAM) or on disk. Accessing data in RAM is much quicker than
accessing data on disk, but devices have much less RAM than disk space.
 
 
Search WWH ::




Custom Search