Database Reference
In-Depth Information
Challenge: Using the techniques you just learned, try to improve the
performance of the DepartmentDetailsViewController . Don't forget to write
tests to measure the before and after execution times.
Hint: There are many methods that provide counts rather than the full records
- these can probably be optimized somehow to avoid loading the contents of
the records.
Where to go from here?
If you followed this chapter all the way through, you've turned a slow, memory hog
of an app into a light and fast app. The final project for this chapter is in the
EmployeeDirectory-Final folder.
When optimizing the sample app's performance, you followed the measure, change
and verify process to avoid unnecessary work. You learned how to use the Memory
Report, Instruments and XCTest tools to take measurements.
Along the way, you learned how to improve your data model by putting large
BLOBs in separate entities and by letting Core Data decide if data should be stored
externally.
You also learned how to improve fetching performance by setting batch sizes and
taking advantage of the NSExpression API.
As with most things, performance is a balance between memory and speed. When
using Core Data in your apps, always keep this balance in mind. With the
measurement tools and some of the techniques in this topic, you're well on the way
to measuring, improving, and verifying performance in your own apps!
 
Search WWH ::




Custom Search