I have a macOS application (10.15.4 Xcode 11.4.1) that has all the necessary entitlements to execute AppleScript against 'Contacts'.
The script works correctly but I am experiencing a 9 second interval to execute this trivial script:
tell application "Contacts" to return the id of the first person whose selected is true
I have experimented with executing this as a compiled script or as [[[NSAppleScript alloc] initWithSource:@"..."];
I see the same time interval either way.
So two questions:
1) Why would the time be the same if it had already been compiled?
2) Why on earth does it take that long to execute?
Any thoughts appreciated!