Database Reference
In-Depth Information
This time, you'll see two messages with total execution time, one next to each test
function.
Note: If you don't see the time messages, you can view the details of each
individual test run in the logs generated during the test. From Xcode's menu
bar, select View , Debug Area , and then Show Debug Area .
As you can see, the new function, totalEmployeesPerDepartmentFast , took 0.042
seconds to complete. That's much faster than the 0.070 seconds used by the
original function, totalEmployeesPerDepartment . You've increased the speed of this
fetch by about 40%!
Fetching counts
As you've already seen, it's often not important what your Core Data objects
contain. Some screens simply need the counts of objects with certain attributes.
For example, the employee detail screen shows the total number of sales an
employee has made since they've been with the company.
Search WWH ::




Custom Search