NSImageRep slower in 10.4 vs 10.3?
NSImageRep slower in 10.4 vs 10.3?
- Subject: NSImageRep slower in 10.4 vs 10.3?
- From: "Matt R" <email@hidden>
- Date: Thu, 11 Jan 2007 17:58:50 -0800
I believe this was recently touched upon on the list, but I can't find the
explanation so my apologies if this is redundant. I recently wrote a test
app which loads PNG files into NSImages, loads the same PNG files into a set
of NSImageReps, and animates both and records FPS output. On my mac at work,
running 10.3.9, I noticed nearly a 3x framerate increase using NSImageRep's
drawInRect method as opposed to NSImage's drawInRect. I emailed myself the
files and then compiled the exact same project, unchanged, on my mac at home
(which is running 10.4.x), and my results were the opposite: NSImage chugged
along at the usual pace, but when it switched to the imageReps, it slowed
down even more.
I've tried to look into any changes made to the ImageRep class in 10.4 and
can't find any explanation for this. Perhaps it's human error, but I've gone
over the simple code with a fine tooth comb and cannot explain this. I was
under the impression that ImageReps were quicker to draw directly than
NSImage because you cut out the overhead of NSImage having to choose the
right rep. On 10.3 this is true, but not on 10.4?
Can anyone enlighten me? I *have* to find a way to squeeze better
performance out of cocoa's image drawing routines.
-matt
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden