> 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 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 issue using Instruments to mesure CPU time. The > heaviest call from my call resulted to [CookieKey encodeWithCoder:] That method should be pretty quick, so if it’s taking a lot of time there may be too many calls to it. My guess is that you’re saving the ‘database’ to disk after every single change. That’s going to take O(n^2) time to add n entries, and I can believe it would be noticeably slow to add 350. Try doing what I said in my last message, using a time delay before saving. —Jens _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com