Core Data: NSFetchedResultsController: When using nested contexts, ignores fetchBatchSize when using a child context.
| Originator: | quellish | ||
| Number: | rdar://18332905 | Date Originated: | Mon, 15 Sep 2014 00:29:10 GMT |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | 8.0 |
| Classification: | Performance | Reproducible: | Always |
Summary: When using NSFetchedResultsController and an NSFetchRequest that includes a fetchBatchSize value, the value is ignored when using the NSSQLiteStoreType and a child context. If the context is the root context (i.e. it has no parent context), this works as intended. Steps to Reproduce: 1. Create an application that uses NSFetchedResultsController with nested contexts. 2. Have the NSFetchedResultsController use a child context. 3. Set a fetchBatchSize value on the fetch request, no sectionNameKeyPath Expected Results: Results should be fetched fetchBatchSize objects at a time. Actual Results: Entire result set is fetched at once. Enabling SQLDebug reveals that when a child context is used, the generated SQL does not include LIMIT. Version: 8.0 (12A365) Notes: Attached is a file with a comparison of the SQLDebug = 3 output when using the root context (working) vs. a child context (not working ) Configuration: iPhone 5s Attachments: 'sqldebug.txt' was successfully uploaded.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!