> 
> 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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to