Speed up your Core Data Stack in 10 Minutes
summary
Shows how to run an NSBatchDeleteRequest on a background context, set the result type to return object IDs, build a changes dictionary and call NSManagedObjectContext.mergeChanges(fromRemoteContextSave:into:) so the main UI context sees deletions without blocking. Notes that batch deletes write synchronously to the store so merging is mandatory. Recommends a private background context parented to the main context (or a persistent coordinator pattern) so heavy fetch/delete work moves off the main thread and UI stays responsive.
AI-written summary · about
chapters (5)
- 0:00Introduction
- 1:06Why Core Data is hated
- 1:55Why Core Data is good
- 3:46Core Data Stack
- 6:38Batch Delete
related talks
41mUsing Core Data in a Modern SwiftUI Application
21mCore Data Custom Store
26mEffective Core Data with Swift
43mWhat Timescale's Approach to Dropping Chunks Tells Us About Concurrent DDL
32mRealm: How I learned to love database again
01h 04mCommon mistakes in EF Core
45mSwiftData as a Replacement for CoreData: Deep Dive
05mAvoiding the Kitchen Sink Database
