Guess I've found the solution. I've replaced automatic lightweight migration with very basic custom migration - with just Xcode generated model mapping - now everything works like a charm. Looks like automatic lightweight migration mechanism cannot handle properly model and data of my persistent store, which is strange because I didn't receive any warning or errors. Thanks for help everyone.
Slow Core Data performance after migration
-
27-06-2023 - |
Frage
i've got some strange Core Data issue after performing an lightweight migration - my app for iPad is using a versioned data model, right now i'm migrating to another data model with only one change : adding an attribute to entity. Migration proceeds without any problems, and after process is done I can run app with all data migrated - only problem is that each save request take about 10x more time than before migration.
- i've checked core data logs of migration process - no error listed
- core data logs (sql queries) are the same before and after migration, only much more slower
- i've opened sqlite database in external sqlite viewer - query times from before migration are the same as times after migration.
- i've added NSSQLiteManualVacuumOption for persistent store after migrations, performance of core data gets a little bit better, still much slower that before migration.
Do have any idea what could be going wrong here? How to restore performance from before migration?
Lösung
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow