Today’s blogpost is by Suneth Mendis, cofounder at M2D2, who wrote to us about the M2D2 app 60Hz. Thanks Suneth!
60Hzis a simple app that helps users to keep track of their favourite TV shows. The app is in its 4th incarnation since its launch back in 2011.
The app churns through lot of data while operating. It has a large number of asynchronous background data-fetching tasks to keep the content in sync with the server. In v3.0, we introduced an NSCoding and keyed archiving technique to persist data in the app. This technique gave us the flexibility and stability we were after, but it carried a major flaw: accessing the persisted archive caused the device to heat up and eventually drain the battery, especially with large user libraries.
As a result, we re-wrote the entire application using Core Data in v4.0. First couple of releases of the app worked relatively well, with fewer crashes. However, the more changes we made to the Core Data schema, the more crashes seemed to come through. We worked really hard to isolate and fix these mysterious crashes, but by v4.1 things turned nasty. Our crash-free user rate was down to 60%, and our Twitter and Facebook feeds were filled with angry comments from our loyal users.
As a desperate measure, we turned to Realm. We had experimented with Realm for another project previously, but abandoned due to the lack of null properties. We realised Realm had matured since our last look and took the plunge to migrate from Core Data to Realm. The migration took few weeks to implement, but the results were stunning. Using Realm significantly reduced the complexity of the app, not to mention the neat and easy-to-understand data accessors. The current implementation of the app uses a combination ofin-memory andpersisted Realms to achieve the functionality. The crashes are no longer mysterious, thanks to very meaningful error messaging in Realm.
Since the launch of v4.2 few weeks ago, the crash-free user rate has gone up to 98% mark (sitting at 100% on most days). More than 120 DAUs compare to less than 80 previously.
Thank you Realm! I am sleeping well knowing our app is stable.
- 1Eclipse卡死 Android SDK resolving error ma
- 2Android Camera HAL浅析
- 6iOS GCD介绍: 基本概念和Dispatch Queue
- 7iOS 多线程下NSOperation、NSBlockOperation
- 8iOS 取四舍五入取平均值
- 10虚拟计算之 libvirt C API/Java API介绍、lib