开发者

Fetching lots of objects with Core Data, what are the consequences?

开发者 https://www.devze.com 2023-03-03 11:43 出处:网络
Does it hurt to execute an NSFetchRequest that retrieves a lot of objects, maybe around 3 ~ 5K? I understand Core Data uses something called \'faulting\' that ensures objects are not in memory until t

Does it hurt to execute an NSFetchRequest that retrieves a lot of objects, maybe around 3 ~ 5K? I understand Core Data uses something called 'faulting' that ensures objects are not in memory until they are actually needed. So if I fetch 5K objects in an NSArray, that means the objects are really just placeholders until I actually access their properties? Is this a ba开发者_如何学Pythond practice?


Core Data is highly optimized and should be able to handle 3-5k objects. You'll need to determine empirically how this affects the run-time memory consumption of your app.

0

精彩评论

暂无评论...
验证码 换一张
取 消