Re: Optimizing NSRectFill
Re: Optimizing NSRectFill
- Subject: Re: Optimizing NSRectFill
- From: Bill Bumgarner <email@hidden>
- Date: Sat, 20 Dec 2008 09:42:53 -0800
On Dec 20, 2008, at 9:18 AM, Michael Ash wrote:
When doing things like this you always need to coalesce events before
drawing. If you're triggering a redraw for every event then you always
leave yourself open to problems. The moment that your events come in
faster than your redraws can occur, you lose. This doesn't necessarily
only happen when your code is really slow. Maybe you find a user on a
really slow computer. Maybe the computer starts to swap. Maybe the
computer is running 300 CPU intensive processes simultaneously. Maybe
the mouse is sending events at 120Hz and the screen is only refreshing
at 60Hz.
And... maybe the test case involves grabbing something w/the mouse and
then rapidly waving the object back and forth over the view to
"quickly" grab some data to sample, thus making the original problem
seem much, much, worse.
(No -- I'm not saying the problem doesn't exist... just that we
developers tend toward spastic monkey behavior when optimizing
something that a real user would perform with directness.)
b.bum
_______________________________________________
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