On Thu, Aug 23, 2012, at 09:34 PM, George Nachman wrote:
> My application implements the NSApplicationDelegate method
> -application:openFile: in its app delegate. There seems to be a problem
> new
> to OS 10.8 where after receiving the apple event to open a file, five
> seconds pass before some kind of internal timeout is hit, a response is
> sent to the apple event, and the calling app (e.g., applescript editor)
> proceeds.

I think AppleScript might be a red herring here. We're seeing a similar
slowdown in use of NSOpenPanel in our apps.

We have a few categories that extend AppKit's target validation
mechanism. When we dismiss our open panel, the toolbar wants to
revalidate, which causes us to repeatedly ask the open panel for its
-supplementalTargetForAction:. Each one of these requests causes an IPC
request, and each request fails with a timeout of around 200ms.

We discovered this by breaking on entry to dispatch_semaphore_wait,
noting the timeout argument, and on exit from
_dispatch_semaphore_wait_slow, noting the (nonzero) return value.

I suspect that, since any form of opening needs to go over the same IPC
channel to communicate with pboxd in order to get rights to the file
being opened, you are experiencing a similar stack of IPC timeouts. The
whole AppleScript suspend/resume thing is just normal Apple Event
processing around that.

--Kyle Sluder
_______________________________________________

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