Re: Improve performance of data structure saved to disk

2015-08-08 Thread Uli Kusterer
On 06 Aug 2015, at 15:36, Juanjo Conti jjco...@carouselapps.com wrote: I've checked the number of entries and is only 350. They are regular cookies for well known sites like google, new relic, twitter... That should not be a performance bottleneck. How often are you calling this (let's call

Re: Improve performance of data structure saved to disk

2015-08-06 Thread Sixten Otto
On Thu, Aug 6, 2015 at 9:31 AM, Jens Alfke j...@mooseyard.com wrote: As far as I know, there’s no good Cocoa solution for super-simple persistence — something like a persistent NSDictionary that can efficiently store any number of keys. This would be pretty easy to implement using a

Re: Improve performance of data structure saved to disk

2015-08-06 Thread Uli Kusterer
On 06 Aug 2015, at 05:17, Juanjo Conti jjco...@carouselapps.com wrote: At the moment I'm using Keyed-Archiving, but after detecting performance issues and read I'm changing to Core-Data. How did you detect these performance issues, and where exactly did it show you that keyed archiving is at

Re: Improve performance of data structure saved to disk

2015-08-06 Thread Juanjo Conti
I was calling archive a lot of times! Changing that really improve performance. Thanks! On Thu, Aug 6, 2015 at 9:09 PM, Graham Cox graham@bigpond.com wrote: With only 350 objects you should be fine using a ‘dumb’ archived dictionary. I’ve used that approach for several thousand objects

Re: Improve performance of data structure saved to disk

2015-08-06 Thread Graham Cox
With only 350 objects you should be fine using a ‘dumb’ archived dictionary. I’ve used that approach for several thousand objects that were more complex than cookies; this was on a Mac, but it was back in 2004 so it was probably slower than today’s iPhones ;-) I detect the performance

Re: Improve performance of data structure saved to disk

2015-08-06 Thread Jens Alfke
On Aug 5, 2015, at 8:42 PM, Quincey Morris quinceymor...@rivergatesoftware.com wrote: IMO, Core Data is a terribly painful technology that will make you very, very miserable, not to mention adding many months to your project. I’m not _quite_ as down on it, but my attempts to use it circa

Re: Improve performance of data structure saved to disk

2015-08-06 Thread Jens Alfke
On Aug 6, 2015, at 6:36 AM, Juanjo Conti jjco...@carouselapps.com wrote: I've checked the number of entries and is only 350. They are regular cookies for well known sites like google, new relic, twitter... With only 350 objects you should be fine using a ‘dumb’ archived dictionary. I’ve

Re: Improve performance of data structure saved to disk

2015-08-06 Thread Juanjo Conti
I've checked the number of entries and is only 350. They are regular cookies for well known sites like google, new relic, twitter... I detect the performance issue using Instruments to mesure CPU time. The heaviest call from my call resulted to [CookieKey encodeWithCoder:] which current

Re: Improve performance of data structure saved to disk

2015-08-05 Thread Quincey Morris
On Aug 5, 2015, at 20:17 , Juanjo Conti jjco...@carouselapps.com wrote: At the moment I'm using Keyed-Archiving, but after detecting performance issues and read I'm changing to Core-Data. What quantity of entries/records are you talking about here? It’s not going to make a big difference to

Improve performance of data structure saved to disk

2015-08-05 Thread Juanjo Conti
Hi there! At the moment I'm using Keyed-Archiving, but after detecting performance issues and read I'm changing to Core-Data. The data structure is a NSMutableDictionary in which keys are instantness of a custom class CookieKey and values and instances of NSHTTPCookie. CookieKey has 3 string