Get flash to fully experience Pearltrees
Code for this project is on GitHub While doing a full re-write of Droplr 's iOS app for the 2.0 launch, I couldn't find any good file/image caches out there had a particular feature I really wanted: extending item expiration whenever it's touched. I set out to write my own — which wasn't that much of a challenge — but somewhere along the process I had this crazy idea that perhaps (SQLite-backed) Core Data would be a much better tool for the job:
If you're new here, you may want to subscribe to my RSS feed or follow me on Twitter . Thanks for visiting! This bug doesn't look so scary on disk! There are many different ways to save your data to disk in iOS – raw file APIs, Property List Serialization, SQLite, Core Data, and of course NSCoding. For apps with heavy data requirements, Core Data is often the best way to go. However, for apps with light data requirements, NSCoding with NSFileManager can be a nice way to go because it’s such a simple alternative.
I spent some time today on improving performance in my iOS development project, and I came up with some results that may be of interest to others working with Core Data. Note that the hacks demonstrated below are based on Time Profiler measurements taken on my (egregiously unoptimized) app under development. The underlying “performance issue” only occurs when you’re using standard Core Data scalar accessors unusually frequently, like my app did. It is overwhelmingly likely that your application does not exhibit the same behavior; therefore, please use Instruments to verify that read accessors are actually slowing down your app before applying any of these tweaks.