Database Reference
In-Depth Information
Now there are multiple fetches, and the initial fetch is faster!
Examine the detail section more closely.
Again, instead of a single fetch, you see multiple quicker fetches.
The first fetch looks like the original fetch, as it is fetching all 50 employees. The
difference is that this time, it's only fetching the count instead of the full objects,
and thus the fetch duration is much quicker. Core Data is doing this automatically
now that you've set a batch size on the request.
Originally this fetch took over 2,000 microseconds, and now it only takes 755
microseconds on my system.
After the first fetch, you can see numerous fetches with fetch counts of 10. These
fetches are happening because you set the batch size to 10. As you scroll through
the employee list, new entities are fetched only when they are needed.
 
Search WWH ::




Custom Search