On 1 Nov 2011, at 01:44, Arbit Richardi wrote:

> I'm looking for tips to speed image drawing on OS X — this is a
> primary function of my application. I started out naively with
> NSImage, switched to CGImage, tried layer backing, and now draw
> directly into a hosted layer with Quartz. I have an implementation
> using CATiledLayers but it doesn't add speed in common cases.
> 
> At this point, large images still draw significantly slower than in
> Preview. For example, I can display a 25MB test JPEG (~9k x 9k pixels)
> in ~2 seconds while Preview can display it in ~1 second on the same
> machine. I can display a 12MB raw (~4k x 3k) in ~2.5 seconds while
> Preview can display it in less than 1 second.
> 
> In my code, almost all that time is spent in CGContextDrawImage() —
> not something I can optimize.
> 
> Looking at rendering the test JPEG in Instruments, I can see that
> Preview's call tree is largely the same as my call tree except that
> Preview uses some sort of custom tiling.

I'm pretty certain Preview is using IKImageView, or at least it used to.
> 
> Looking at the rendering the test raw in Instruments, the primary
> difference is that my code calls a specific RawCamera function three
> times more than Preview calls it. What this means, I don't know.
> 
> I've combed the documentation, the internet, and the list archives
> pretty thoroughly and I feel like I'm about out of things to try. Can
> anyone give me advice or leads?
> 
> Thanks
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please 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:
> http://lists.apple.com/mailman/options/cocoa-dev/cocoadev%40mikeabdullah.net
> 
> This email sent to cocoa...@mikeabdullah.net

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to