• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How Can I Notify DrawRect Method?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: How Can I Notify DrawRect Method?
      • From: "I. Savant" <email@hidden>
References: 
 >How Can I Notify DrawRect Method? (From: "Chunk 1978" <email@hidden>)
 >Re: How Can I Notify DrawRect Method? (From: "I. Savant" <email@hidden>)
 >Re: How Can I Notify DrawRect Method? (From: "Michael Ash" <email@hidden>)
 >Re: How Can I Notify DrawRect Method? (From: "I. Savant" <email@hidden>)
 >Re: How Can I Notify DrawRect Method? (From: Ricky Sharp <email@hidden>)
 >Re: How Can I Notify DrawRect Method? (From: "I. Savant" <email@hidden>)

  • Prev by Date: Re: Custom NSTableView cells
  • Next by Date: Re: Creating a window when pressing a button
  • Previous by thread: Re: How Can I Notify DrawRect Method?
  • Next by thread: Re: How Can I Notify DrawRect Method?
  • Index(es):
    • Date
    • Thread