I’m trying to debug a strange problem I’m having, and I’m absolutely clueless where to begin. This question is simple though:
I have a fetch request that returns about 2000 objects, but with a batchSize of 15. So only 15 objects are loaded into memory, the rest are faulted in as they are needed. The issue I’m having is that for some reason all my objects are being faulted in immediately when the fetch request finishes. This takes about 20 seconds. I don’t understand why it’s happening.
It must mean I’m accessing all these objects somehow, causing them all to be faulted. Does calling fetchedResultsController.fetchedObjects.count cause all objects to be faulted by any chance?
The documents say this about
fetchedObjectsWhat are you trying to do? The correct way to get the count is like this: