Monday, November 1, 2021 [Tweets] [Favorites]

AppleScript Much Faster in Monterey

leo_r:

I wonder if it’s just me - or AppleScript is much faster on Monterey?

In fact it’s just blazingly fast.

For example, I have a script that polls InDesign document’s elements for certain attributes.

On Monterey, it takes 15 seconds to scan this 96-page document.

On previous systems it was much longer: 85 seconds on Big Sur. So Monterey is about 6 times faster.

I really noticed this with OmniFocus. I use this script to defer a selection of actions until tomorrow. It used to take what felt like almost 1 second per action. I could see them changing color one-by-one. Now it processes 20 actions almost instantaneously.

Shane Stanley

The issue has been blogged about a bit here (in Japanese) by @Piyomaru.

I believe the speed-up with AppleScriptObjC code is even greater.

Takaaki Naganoya (Apple translation):

At least Cocoa call speed, which was extremely slow in macOS 10.15, has been improved (even on Intel Mac), and Cocoa call speed on Apple Silicon Mac has been greatly improved. It’s 30-40 times faster than macOS 11. This is because Cocoa function calls from AppleScript were extremely slow on macOS 11+Apple Silicon Mac (not the high-performance core “FireStorm”, but the high-efficiency core “IceSt” This is because the point that was executed in “orm” has been corrected.

Even if you don’t use Cocoa’s features, it’s faster than macOS 11, so I recommend updating to macOS 12 for Scripter using M1 Mac (workplace apps Except if there is a policy not to update to maintain compatibility with theケーション).

It is also affected by structural changes in the OS. As previously reported, the framework in macOS is reorganized around macOS 11 (the one that was Umbrella Framework is independent. In particular, it is necessary to rewrite it to point to another thing with the use command.

6 Comments

I frequently need to grab thousands of tracks and their info from a Music app library using ITLibrary framework. Seems to me it would take a few seconds per thousand. Now, I can index a 40K track library in about 3 seconds.

Zooma zooma zoo-ma zoom!

Fascinating. I wonder if this was preparation work for the Shortcuts app?

Shane Stanley

I think it was largely fixing bugs. AppleScriptObjC used to be much faster, but something happened around macOS 10.14 and its speed dropped by close to an order of magnitude. Even with that, it was still fast enough (relatively) that people just lived with it, and put it down to security changes or somesuch.

[…] berichtet hat der Entwickler Michael Tsai hier. Seinen Informationen aus der Community zufolge sind AppleScripts in macOS Monterey bis zu sechsmal […]

[…] that may be welcome, such as an improved interface in the Finder when copying large files and AppleScript being reportedly much faster in Monterey. Plus, as Howard Oakley notes, Apple seems to be focusing its bug fix and security attention on […]

Beatrix Willius

Archiving 17k emails from Outlook which is done primarily with AppleScript:
iMac from 2018 High Sierra, not even an SSD: 22min
Newest MacBook Air from 2021, Monterey latest beta: 45min

What does this tell me?

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment