• 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
setMarkerLocation = 44% CPU?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

setMarkerLocation = 44% CPU?


  • Subject: setMarkerLocation = 44% CPU?
  • From: Lorenzo <email@hidden>
  • Date: Mon, 07 Jan 2008 19:01:30 +0100

Hi,
I run my animation at 60 FPS speed.
During the playback I move a timeMarker along its NSRulerView with

    [hRulerView setNeedsDisplayInRect:[playbackMarker imageRectInRuler]];
    [playbackMarker setMarkerLocation:playbackTime];
    [hRulerView setNeedsDisplayInRect:[playbackMarker imageRectInRuler]];

Well, I have checked the CPU % with "top" on the Terminal and during the
playback my app gets 44% of the CPU. If I comment the 3 lines of code here
above, the CPU % goes down dramatically to 3.6%. Even if I comment the line
setMarkerLocation only it goes to 3.6%.
I have verified with "Quartz Debug" that the "yellow" region of the
NSRulerView I refresh is just the one under the timeMarker. I am sure I am
making something wrong, because that 44% value is really to much, so please
where should I look at to catch my bug?


P.S.
- I run MacOSX 10.5.1 on a MacBook Pro, C2D 2.4 GHz,
  with NVIDIA 8600M GT 256MB VRAM, 17".
- I don't subclass the NSRulerView method drawBackgroundInRect
- No other apps are open. Airport is off.


Best Regards
--
Lorenzo
email: email@hidden

_______________________________________________

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

  • Follow-Ups:
    • Re: setMarkerLocation = 44% CPU?
      • From: Bill Bumgarner <email@hidden>
    • Re: setMarkerLocation = 44% CPU?
      • From: Alastair Houghton <email@hidden>
  • Prev by Date: Re: Encoding NSUInteger
  • Next by Date: Re: setMarkerLocation = 44% CPU?
  • Previous by thread: QTCaptureView retain count problem and setting iSight's focus (macro)
  • Next by thread: Re: setMarkerLocation = 44% CPU?
  • Index(es):
    • Date
    • Thread