• 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: drawing performance
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: drawing performance


  • Subject: Re: drawing performance
  • From: John Randolph <email@hidden>
  • Date: Fri, 5 Dec 2003 16:16:11 -0800

On Dec 5, 2003, at 3:48 PM, Matthew Johnson wrote:

If a view consists of relatively simple static elements I am wondering what is generally the best performing way to render it . Since the elements are static an image could be created loaded, but since if the elements aren't super complex it might be better to just draw them. What are some opinions on this? Draw the paths directly or use a prepared image file and NSImage?

Drawing paths is pretty snappy, as long as they don't intersect themselves too often. If your paths take a lot of time to generate, then the NSImage is a pretty good first-pass optimization.

Of course, any optimization can be wasted effort if undertaken too soon. ;-)

-jcr


John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: drawing performance
      • From: Georg Tuparev <email@hidden>
References: 
 >drawing performance (From: Matthew Johnson <email@hidden>)

  • Prev by Date: Re: Coalescing Messages From Continuous Controls
  • Next by Date: Re: NSApplication Newbie
  • Previous by thread: drawing performance
  • Next by thread: Re: drawing performance
  • Index(es):
    • Date
    • Thread