Re: NSTimer's heavy on MIPS?
Re: NSTimer's heavy on MIPS?
- Subject: Re: NSTimer's heavy on MIPS?
- From: Mike Paquette <email@hidden>
- Date: Wed, 25 Oct 2006 21:11:28 -0700
On Oct 25, 2006, at 7:33 PM, David Brackman wrote:
It uses NSTimer to set up a 1/60th second update. In the timer
callback, I update the positions of about 10-15 objects, and redraw
the 800x600 view (not opaque). I find that these NSTimer's are
sucking quite a bit of the Window Server's MIPs (30% on a Mac Pro
with 4 cores). The objects themselves each only require 1 or 2
bezier paths, so I'm not sure what's taking all of the CPU.
It's not the timers, it's what you do with them. The window server
is going to flush all of your changes to the display as you redraw
and flush the view content. The drawing of the objects takes place
in your application, but the compositing of all those pixels happens
in the window server.
800 x 600 pixels * 60 repaints per second == 28,800,000 pixels per
second that are recomputed and pushed to the display.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden