Re: Improve performance of data structure saved to disk
Re: Improve performance of data structure saved to disk
- Subject: Re: Improve performance of data structure saved to disk
- From: Uli Kusterer <email@hidden>
- Date: Sat, 08 Aug 2015 11:33:33 +0200
On 06 Aug 2015, at 15:36, Juanjo Conti <email@hidden> 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 it saveAllCookies for lack of a better term) on your entire cookie storage per whatever unit of time makes sense? Like, when a new cookie comes in, is there more than one call to saveAllCookies?
> This is part of a CookieStorage class replacement, so I read/write the hole
> storage each time a cookie is set or deleted.
So, how large is the biggest cookie? What's the average size? If your cookies are large, it might be better to just individually serialize each cookie to its own file and then only write out ones that have actually changed.
Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://stacksmith.org
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden