• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSTimer's heavy on MIPS?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTimer's heavy on MIPS?


  • Subject: NSTimer's heavy on MIPS?
  • From: David Brackman <email@hidden>
  • Date: Wed, 25 Oct 2006 19:33:11 -0700

Hi,

I'm new to Cocoa and Mac dev in general. I'm following an online tutorial to create a simple game in RubyCocoa, and have since ported it to Objective-C. 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.

Are NSTimer's just not meant to be used at 60fps? Perhaps NSTimer has a heavy overhead in the NSRunLoop?

Thanks,
Dave.
_______________________________________________
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


  • Follow-Ups:
    • Re: NSTimer's heavy on MIPS?
      • From: j o a r <email@hidden>
    • Re: NSTimer's heavy on MIPS?
      • From: Mike Paquette <email@hidden>
  • Prev by Date: path vs. filename..
  • Next by Date: Re: path vs. filename..
  • Previous by thread: Re: path vs. filename..
  • Next by thread: Re: NSTimer's heavy on MIPS?
  • Index(es):
    • Date
    • Thread