Xcode 15 fetchBatchSize warning exceeds SQLite page size
0 reputation · 19 Nov 2026, 18:16 UTC
In Xcode 15, Core Data fetch requests configured with fetchBatchSize are subject to a compiler warning when the specified batch count exceeds the typical SQLite page size, currently recommended at approximately one thousand rows per batch. Developers working with large datasets must reconcile this limit with the need to maintain smooth UI scroll performance, particularly when sortDescriptors reference deeply nested relationships that can force full table scans regardless of batch configuration.
The fetchBatchSize property controls round-trip volume but does not alter in-memory faulting behavior; objects beyond the current batch remain faults until explicitly fetched, potentially introducing additional loads during rapid scrolling. Furthermore, SwiftUI's @FetchRequest does not expose a pagination token, requiring manual offset-based strategies that may interact unpredictably with batch-size settings and nested relationship sorting.
- What is the practical upper bound for fetchBatchSize that avoids Xcode 15 warnings while preserving scroll responsiveness on devices with fifty thousand or more records?
- How does configuring fetchBatchSize interact with sortDescriptors that traverse deep relationship paths in SQLite?
- Can @FetchRequest be safely used for large-scale pagination without custom token implementation?