From 7377d5adc4cfacb16af6a5e7e11c285c762b415f Mon Sep 17 00:00:00 2001 From: John Estropia Date: Fri, 20 Mar 2015 00:46:18 +0900 Subject: [PATCH] Update README.md --- README.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index eac34dc..489dc83 100644 --- a/README.md +++ b/README.md @@ -67,15 +67,17 @@ If you are already familiar with the inner workings of CoreData, here is a mappi | *Core Data* | *HardcoreData* | | --- | --- | -| `NSManagedObjectModel` / `NSPersistentStoreCoordinator`
(.xcdatamodeld file) | `DataStack` | -| `NSPersistentStore`
("Configuration"s in the .xcdatamodeld file) | `DataStack` configuration
(multiple sqlite / in-memory stores per stack) | -| `NSManagedObjectContext` | `BaseDataTransaction` subclasses
(`SynchronousDataTransaction`, `AsynchronousDataTransaction`, `DetachedDataTransaction`) | +| `NSManagedObjectModel` / `NSPersistentStoreCoordinator`
(.xcdatamodeld file) | `DataStack` | +| `NSPersistentStore`
("Configuration"s in the .xcdatamodeld file) | `DataStack` configuration
(multiple sqlite / in-memory stores per stack) | +| `NSManagedObjectContext` | `BaseDataTransaction` subclasses
(`SynchronousDataTransaction`, `AsynchronousDataTransaction`, `DetachedDataTransaction`) | -RestKit and MagicalRecord set up their `NSManagedObjectContext` this way: +RestKit and MagicalRecord set up their `NSManagedObjectContext`s this way: +nested contexts -This ensures maximum data integrity between contexts without blocking the main queue. But as Florian Kugler's investigation found out, merging contexts is still by far faster than nesting contexts. HardcoreData's `DataStack` takes the best of both worlds by treating the main `NSManagedObjectContext` as a read-only context, and only allows changes to be made within *transactions*: +This ensures maximum data integrity between contexts without blocking the main queue. But as Florian Kugler's investigation found out, merging contexts is still by far faster than saving nested contexts. HardcoreData's `DataStack` takes the best of both worlds by treating the main `NSManagedObjectContext` as a read-only context, and only allows changes to be made within *transactions*: +nested contexts and merge hybrid -This allows for a butter-smooth main thread, while still benefitting from the safety of nested contexts. +This allows for a butter-smooth main thread, while still taking advantage of safe nested contexts.