Checking for duplicates when importing to CoreData

蓝咒 提交于 2019-12-02 13:31:43

As far I know, the best way to find and/or import objects within Core Data is described in Implementing Find-or-Create Efficiently.

The documentation describes a find or create pattern that it's based on sorting data: the data you download from the service and the data you grab form the store.

I really suggest you to read the link I provided. You will see a speed up on your performances.

Obviously you should do the work in background, preventing the main thread to freeze, using thread confinement or new iOS Core Data queue API.

Hope that helps.

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