On Dec 19, 2008, at 7:37 AM, Oleg Krupnov wrote:

I'm developing a custom view and noticed that drawRect is becoming
increasingly slow. The Shark has pointed out that the bottleneck is
the NSRectFill function (that calls CGContextFillRect under the hood)
that I use to draw the background of the view.

A common cause of apparently excessive time in graphics related ops is that you are running afoul of coalesced updates by attempting to refresh faster than 60 times a second.

See http://developer.apple.com/documentation/Performance/Conceptual/Drawing/Articles/FlushingContent.html . Try disabling coalesced updates in Quartz Debug and see if it speeds up your drawing. If so, ensure your app does not refresh faster than 60 Hz.

-Peter

_______________________________________________

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