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

Re: drawing efficiently


  • Subject: Re: drawing efficiently
  • From: Ondra Cada <email@hidden>
  • Date: Mon, 25 Mar 2002 11:51:00 +0100

On Monday, March 25, 2002, at 04:48 , Oscar Bascara wrote:

Another question about drawing efficiently has to do with the use of factory methods. How efficient is it to alloc, init, and autorelease many of these temporary objects every time drawRect: is called, like with [NSColor blackColor] and the NSBezierPath objects? Or, is the bottlenecking in the actual rendering (stroke, fill, etc.) and time spent handling temporarily created objects not significant?

Autoreleasing is generally efficient enough: first just write the thing so that it works, the most convenient way from the programmer's POV. It is *pretty* probable that it will work efficiently enough, even despite those grave bugs Apple did in redrawing code (in short, many views get very often utterly unnecesarily redrawn).

If your app has the bad luck of falling into the small number of those which are *not* efficient enough, you can use Sampler and optimalize afterwards.
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
2K Development: email@hidden http://www.2kdevelopment.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
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.
References: 
 >drawing efficiently (From: Oscar Bascara <email@hidden>)

  • Prev by Date: Re: Problems running UNIX Apps in Cocoa GUI
  • Next by Date: Re: CMSDA
  • Previous by thread: drawing efficiently
  • Next by thread: miscellaneous questions
  • Index(es):
    • Date
    • Thread