Core Data “Upsert” from SQLite Database

你离开我真会死。 提交于 2019-12-01 01:11:02

Where is the original database coming from?

Typically, you would convert all your data to Core Data during development and then ship the app with a pre-populated Core Data store (no need for a user to wait for an import).

Apple has some suggestions on how to optimize large imports into a Core Data store:

  • Disable the undo-manager during batch import
  • Don't insert record-by-record - Create batches of size n (depending on record size)
  • Use a local autorelease pool and drain it after each batch

See the documentation for the details.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!