• 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: optimization time !
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: optimization time !


  • Subject: Re: optimization time !
  • From: Enrique Zamudio <email@hidden>
  • Date: Fri, 06 Jul 2001 21:07:29 -0500
  • Organization: Nasoft

Are you paying attention to the rectangles passed to you in the
-drawRect: method of your view?

I think for better performance, you have to check if the rect passed is
the same as the bounds rect of your view, and then draw the whole thing;
if the rect is smaller, you only need to draw whatever will be visible
inside that rect.

I don't know if you are using NSBezierPath (my guess is that you are).
Are you using the class methods to draw lines, or are you using a
bezierpath instance and adding lines to it? That might slow things down,
since the bezierpath gets redrawn completely (that is, if you add a line
and then tell the path to draw, it will draw ALL the lines it has
instead of just the last one).

I'm not an expert but I've used the NSBezierPath a couple of times. I
don't even know if there is another interface to Quartz so you can draw
faster (I did some code in PostScript a while ago, back in the NextStep
days, and it was FAST).

eZL


  • Prev by Date: Filtering (Re: Daemons)
  • Next by Date: Re: How to stop initial window ?
  • Previous by thread: Re: optimization time !
  • Next by thread: Re: How do I turn off the spinning multi-colored cursor? I don't want to con...
  • Index(es):
    • Date
    • Thread