|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
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. 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 (email@hidden) 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: This email sent to email@hidden
Visit the Apple Store online or at retail locations.
Copyright © 2011 Apple Inc. All rights reserved.