On 20 Dec 2008, at 2: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. I am disappointed that
such a basic operation could ever impair performance, but it does. It
looks like the bigger is the rectangle, the slower is performance.

I have read the list regarding this issue, but I haven't found any
solution. NSRectFillList, CGContextFillRect do not give any
performance gain.

My question is - is there a way to bypass the advanced path-related
stuff that causes the slow-down, and just get down to some kind of
fast drawing?

Show your code.

As Bill suggests, there's no way that NSRectFill is slow. If Shark is pointing the finger at it, it's probably because you are calling it much more often than necessary.

--Graham


_______________________________________________

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