• 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: Fastest way to push strings to the screen in an NSView?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fastest way to push strings to the screen in an NSView?


  • Subject: Re: Fastest way to push strings to the screen in an NSView?
  • From: "M. Uli Kusterer" <email@hidden>
  • Date: Thu, 18 Nov 2004 03:31:25 +0100

At 18:08 Uhr -0800 17.11.2004, Scott Ellsworth wrote:
Roughly half the time my program takes is spent drawing attributed strings to the screen, according to Shark. This surprises me, as there are no more than 1200 on the screen at once, though they are drawn at a variety of locations. The attributes are not complicated, either.

Are there any that are clipped? I've found that Quartz isn't as good as Quickdraw used to be at finding out when not to do work. So, if you're drawing stuff that is offscreen, you can gain a good deal of speed by checking your coordinates and not drawing when they're off-screen.


Similarly, if you incrementally add strings to your view, use setNeedsDisplayInRect: to mark only the area that changed for redisplay, and in the drawRect: method of your view, check the rect that you get passed and only redraw what intersects that rect.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
References: 
 >Fastest way to push strings to the screen in an NSView? (From: Scott Ellsworth <email@hidden>)

  • Prev by Date: Re: Fastest way to push strings to the screen in an NSView?
  • Next by Date: Re: Fastest way to push strings to the screen in an NSView?
  • Previous by thread: Re: Fastest way to push strings to the screen in an NSView?
  • Next by thread: Fastest way to push strings to the screen in an NSView?
  • Index(es):
    • Date
    • Thread