• 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
Re: Spinning the busy indicator
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Spinning the busy indicator


  • Subject: Re: Spinning the busy indicator
  • From: Roland King <email@hidden>
  • Date: Fri, 01 May 2015 10:59:42 +0800


>
> Stumped.
>
> —Graham
>

I don’t have a lot more ideas than you, having been reading this thread (no pun intended) for 2 days.

Is this only happening when you click to bring up a menu when your app is running or at other times too? I can’t currently think of a good reason why opening a menu ends up resulting in an XPC call, worse, an XPC call which is synchronous and waits for a reply, on the main thread. Do the classes/methods in the trace, InstallEventHandler(), TEventTypeIndex, GlobalRegistryEventRegistered and LSNotificationReceiver mean anything to you, or anyone else?

Might be time to grit teeth and break out Instruments. That can quite usefully show you breakdowns by queue, by thread or by processor. Sometimes just looking at the pattern gives you a clue what’s happening. It will surely tell you if you have the CPUs all spun up to 100%.

The xpc call which is hanging. Are xpc services always separate processes, I thought so but someone can correct me if wrong. If so, it sounds like the xpc service being used is starved of resources because the CPUs are busy mandelbrotting, so it doesn’t reply very quickly and blocks your main thread. If you open and close menus on a barebones system running just your app, can you find another process which keeps spinning up?

It looks to me that opening a menu calls some xpc service which is expected to return quickly but doesn’t because the machine is swamped (Instruments should be able to tell you if it is). Whether that xpc call is something the OS does all the time or if there’s something in your app which is causing it, can’t say. Synchronous calls to xpc services from the main thread would seem to be something Apple is always telling devs not to do, so it’s probably them.


_______________________________________________

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: Spinning the busy indicator
      • From: Roland King <email@hidden>
References: 
 >Spinning the busy indicator (From: Graham Cox <email@hidden>)
 >Re: Spinning the busy indicator (From: Quincey Morris <email@hidden>)
 >Re: Spinning the busy indicator (From: Graham Cox <email@hidden>)
 >Re: Spinning the busy indicator (From: Quincey Morris <email@hidden>)
 >Re: Spinning the busy indicator (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Parent/child view controllers: when shall we use it?
  • Next by Date: Re: Spinning the busy indicator
  • Previous by thread: Re: Spinning the busy indicator
  • Next by thread: Re: Spinning the busy indicator
  • Index(es):
    • Date
    • Thread