Note that there are some explanatory texts on larger screens.

plurals
  1. POCore Data vs NSFileManager
    text
    copied!<p><strong>The problem:</strong></p> <p>I have been using for some time now my own cache system by using <code>NSFileManager</code>. Normally the data I receive is JSON and I just save the dictionary directly into cache (in the Documents Folder). When I need it back I will just go get it. I also implement, sometimes when I feel it's better, a <code>NSDictionary</code> on the root Folder with keys/values for the path for a given resource. For example:</p> <p>Resource about weather in Geneve 17/02/2013, so I would have a key called GE_17_02_2013 and the value the path to the <code>NSDictionary</code> with the information. </p> <p>Normally I don't need to do any complex queries. But, somehow, and from what I have been reading, when you have a lot of data, you should stick with Core Data. In my case, I normally have a lot of data, but I never actually felt the application going down, or suffering in terms of performance. So my questions are:</p> <ol> <li><p>In this case, where sometimes (the weather thing was just an example) I need to just remove all the data (a Twitter feed, for example) and replace it by a completely new stream of data, is Core Data worth? I think removing all the data, and inserting (populating) it, is heavier than just store the <code>NSDictionary</code> and replacing the old one.</p></li> <li><p>Sometimes it would envolve images, textFiles, etc and the <code>NSFileManager</code> does it perfectly, so what advantages could Core Data bring in this cases?</p></li> </ol> <p><strong>P.S:</strong> I just saw <a href="http://biasedbit.com/filesystem-vs-coredata-image-cache/" rel="nofollow">this</a> post, where this kind of question is made and numbers prove which one is actually faster. Still, I would like as well an empiric answer. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload