On 10 Dec 2008, at 12:25 pm, I. Savant wrote:

Asking for the shared user defaults instance, then asking it for a value, then unarchiving a more useful object from it, *then* using it to draw is certainly more work than caching the value only when it changes. It's not like it's performance tuning - it's *basic design*.


Just to clear something up for myself, doesn't NSUserDefaults cache everything internally in memory anyway? So really you're not unarchiving every time but just fetching an object from a dictionary, with no excessive performance overhead. I realise this is an implementation detail, but there's nothing in the docs that implies that the defaults values are unarchived from disk every time; why would they be? Surely that's why there is a required -synchronize method to force the contents on disk to be updated?

--Graham


_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to