Re: How Can I Notify DrawRect Method?
Re: How Can I Notify DrawRect Method?
- Subject: Re: How Can I Notify DrawRect Method?
- From: Graham Cox <email@hidden>
- Date: Wed, 10 Dec 2008 12:44:39 +1100
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 (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