Re: Finder vs. Quartz performance.
Re: Finder vs. Quartz performance.
- Subject: Re: Finder vs. Quartz performance.
- From: Ricky Sharp <email@hidden>
- Date: Wed, 22 Dec 2004 18:21:35 -0600
On Dec 22, 2004, at 4:03 PM, Toby Smith wrote:
Here's what I don't get. I have an ancient G3 Mac running 10.3. If I
cobble up a bit of code with a single CGContextDrawImage() and a single
CGContextShowTextAtPoint(), with an image that's 1024x768, I get a
frame
rate that's maybe 10fps. If I add shadows to that text, I'm at about
1fps. Not exactly ready to ship.
Now, on that same machine, whose monitor is 1280x1024, with a pretty
little desktop image, I drag a window around, that window drags itself
around just great, with a shadow, keeping up with the mouse with no
problems.
On Dec 22, 2004, at 4:10 PM, Paolo Costabel wrote:
The window image is cached, that's why it renders fast. Rendering text
every frame is slow: try creating an image and render that instead.
Caching is definitely a good thing. For my needs, everything in my
custom UI ultimately gets rendered to a cached NSImage.
But you'll ultimately want to profile things especially if your text
changes often. For example, for text that would only live for a single
frame, you may find that rendering text to an image followed by
blitting that image may be slower than just rendering the text
directly.
There have been a few threads recently about rendering text, so check
the archives.
And, while it doesn't use cached NSImages, definitely check out the
following example as it demonstrates a few approaches in obtaining
better text performance:
/Developer/Examples/AppKit/Worm/
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
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