• 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
What's using the processor during idle-time?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

What's using the processor during idle-time?


  • Subject: What's using the processor during idle-time?
  • From: Chaz McGarvey <email@hidden>
  • Date: Wed, 21 Jul 2004 18:11:13 -0600

Hello:

I have an app which has started using a lot more processor time while idle. Normally it uses 0% of the processor (as displayed by top) when the program is idle, but lately it shows up as 10-15%. But the interesting thing is this increased use of the processor only occurs when a certain window is key (and the program itself is front-most). I can't think of what I could have done to cause this to happen except that a little while ago I started using a subclass of NSDocument instead of a subclass of NSWindowController to manage the window that supposedly causes the increased processor use (because I decided it would make sense for the window to have the benefits of being a document).

I have done a sample on the program under the circumstances which cause this increase processor usage, but unfortunately I can't really tell what it means as far as what is causing this to happen. I've included the last bit of the sample, but the full sample can be found at http://www.brokenzipper.com/sample.txt .

Total number in stack (recursive counted multiple, when >=5):
20 objc_msgSend
14 __spin_unlock
10 calloc
10 szone_calloc
8 -[NSView lockFocusIfCanDraw]
8 CGGStateClipToRect
8 mach_msg
8 mach_msg_trap
8 malloc_zone_calloc
7 -[NSView _focusFromView:withContext:]
7 -[NSView _gatherFocusStateInto:upTo:withContext:]
7 CGContextClipToRect
6 -[NSObject retain]
6 -[NSView _convertRect:toAncestor:]
6 -[NSViewHierarchyLock lockForReadingWithExceptionHandler:]
6 CGContextRestoreGState
6 malloc_zone_malloc
6 pthread_mutex_lock
6 szone_free
5 -[NSFocusStack popTopView]
5 -[NSFocusState flush]
5 -[NSView _focusInto:withClip:]
5 -[NSView _regionForOpaqueDescendants:forMove:]
5 -[NSView convertRect:toView:]
5 -[NSView unlockFocus]
5 CGContextSaveGState
5 NSIncrementExtraRefCount
5 pthread_mutex_unlock
5 ripc_DrawImageObject
5 szone_malloc

Sort by top of stack, same collapsed (when >= 5):
mach_msg_trap 2923
select 2873
syscall_thread_switch 2474
ARGB32_image_mark 63
objc_msgSend 21
ARGB32_image_mark_RGB32 18
ARGB32_image_ARGB32 16
__spin_unlock 14
ARGB32_mark_bitmapshape 10
vec4CGSFillDRAM64 9
szone_calloc 6

If anyone can help me interpret this sample or can propose to me what could be causing this, please let me know.

Thanks,
Chaz McGarvey
http://www.brokenzipper.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: What's using the processor during idle-time?
      • From: Shawn Erickson <email@hidden>
    • Re: What's using the processor during idle-time?
      • From: Shawn Erickson <email@hidden>
  • Prev by Date: Detecting Changes in NSObjectController
  • Next by Date: Re: Problems with NSTextField and attributed strings
  • Previous by thread: Detecting Changes in NSObjectController
  • Next by thread: Re: What's using the processor during idle-time?
  • Index(es):
    • Date
    • Thread