• 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: "Sean McBride" <email@hidden>
  • Date: Tue, 9 Dec 2008 22:37:52 -0500

I. Savant (email@hidden) on 2008-12-09 8:25 PM said:

>   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*.

Well, such things are never black and white, of course... but I just
wanted to add that caching the value increases your application's memory
use (admittedly only slightly in the case being discussed).  But in the
general case, by increasing memory use you:
 - can fit less in the CPU's cache
 - increase paging
 - etc.

So it could actually lead to making your app slower!

IMNSHO, best to write the least code possible, profile, and change as needed.

Sean


_______________________________________________

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: How Can I Notify DrawRect Method?
  • Next by Date: Re: Fix for Core Data + NSTreeController + NSOutlineView Crashes?
  • Previous by thread: Re: How Can I Notify DrawRect Method?
  • Next by thread: Re: How Can I Notify DrawRect Method?
  • Index(es):
    • Date
    • Thread