How can I improve core data fetch performance on the iPhone?

前端 未结 4 369
不知归路
不知归路 2021-02-01 11:06

Core data\'s performance on the iPhone is absolutely miserable. Is indexing completely broken or is it just a poor implementation?

I have about 21500 objects of a single

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-01 12:00

    This isn't going to answer your question but might give you something to think about. Using just SQLite on the iPhone I was mightily disappointed with performance. I was dealing with about 8000 entries which would take about a two minutes to insert / sort if returning all and so on.

    Playing around with it I found the time needed to filter / sort in memory was 100 fold better than letting it be done SQLite and I think its mainly due to the performance of the flash memory.

    In short the less Core Data has to use the flash memory the better performance you will get and I don't think there would be many ways to make it much better.

提交回复
热议问题