每天推送5篇优质英文文章 · By makers, for makers

运营 1587 天, 推荐好文 6,470 篇, 原创简评 1,272,128 字, 原文总阅读时间 58,079 分钟, 198,348 人订阅

(原链接可能被墙了,打印成 pdf 放到这里 https://nfil.es/w/OWKCXl/) 这是今年 @Scale 上,Facebook 的这个 talk 的文字版。 Core Data 是瓶颈。 Core Data is at heart an object-relational mapper (ORM). It provides features like full normalization and synchronous consistency across multiple isolated contexts. But since the Facebook app is essentially a cache for data that lives on the server, a completely normalized representation of data wasn't needed. All of those fetch-or-creates while parsing JSON objects were resource-intensive and unnecessary. We developed our own bare-bones form of model objects guided by three principles:
  • Immutability. In this new data layer, models are completely immutable after creation.
  • Denormalized Storage. To serialize these models to disk, we chose to use NSCoding.
  • Asynchronous, Opt-In Consistency. By default, there are no consistency guarantees.
打赏 如果你觉得我推荐的这篇文章(或我写的简评)不错,对你有所启发,可以考虑请我喝杯咖啡。 感谢 239 位读者捐款了 $1,757.52
分享到:
App 内打开