{"id":34075,"date":"2021-11-01T17:00:58","date_gmt":"2021-11-01T21:00:58","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=34075"},"modified":"2021-11-01T19:48:39","modified_gmt":"2021-11-01T23:48:39","slug":"applescript-much-faster-in-monterey","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2021\/11\/01\/applescript-much-faster-in-monterey\/","title":{"rendered":"AppleScript Much Faster in Monterey"},"content":{"rendered":"<p><a href=\"https:\/\/forum.latenightsw.com\/t\/applescript-much-faster-on-monterey\/3391\">leo_r<\/a>:<\/p>\n<blockquote cite=\"https:\/\/forum.latenightsw.com\/t\/applescript-much-faster-on-monterey\/3391\">\n<p>I wonder if it&rsquo;s just me - or AppleScript is much faster on Monterey?<\/p>\n<p>In fact it&rsquo;s just blazingly fast.<\/p>\n<p>For example, I have a script that polls InDesign document&rsquo;s elements for certain attributes.<\/p>\n<p>On Monterey, it takes 15 seconds to scan this 96-page document.<\/p>\n<p>On previous systems it was much longer: 85 seconds on Big Sur. So Monterey is about 6 times faster.<\/p>\n<\/blockquote>\n\n<p>I really noticed this with OmniFocus. I use <a href=\"https:\/\/c-command.com\/scripts\/omnifocus\/defer-to-tomorrow\">this script<\/a> 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.<\/p>\n\n<p><a href=\"https:\/\/forum.latenightsw.com\/t\/applescript-much-faster-on-monterey\/3391\/2\">Shane Stanley<\/a><\/p>\n<blockquote cite=\"https:\/\/forum.latenightsw.com\/t\/applescript-much-faster-on-monterey\/3391\/2\"><p>The issue has been blogged about a bit <a href=\"http:\/\/piyocast.com\/as\/\">here<\/a> (in Japanese) by @Piyomaru.<\/p>\n<p>I believe the speed-up with AppleScriptObjC code is even greater.<\/p><\/blockquote>\n\n<p><a href=\"http:\/\/piyocast.com\/as\/archives\/13720\">Takaaki Naganoya<\/a> (Apple translation):<\/p>\n<blockquote cite=\"http:\/\/piyocast.com\/as\/archives\/13720\"><p>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&rsquo;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 &ldquo;FireStorm&rdquo;, but the high-efficiency core &ldquo;IceSt&rdquo; This is because the point that was executed in &ldquo;orm&rdquo; has been corrected.<\/p><p>Even if you don&rsquo;t use Cocoa&rsquo;s features, it&rsquo;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&#x30B1;&#x30FC;&#x30B7;&#x30E7;&#x30F3;).<\/p><p>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.<\/p><\/blockquote>","protected":false},"excerpt":{"rendered":"<p>leo_r: I wonder if it&rsquo;s just me - or AppleScript is much faster on Monterey? In fact it&rsquo;s just blazingly fast. For example, I have a script that polls InDesign document&rsquo;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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2021-11-01T21:01:02Z","apple_news_api_id":"58974341-39bd-4815-8f24-8150e7737964","apple_news_api_modified_at":"2021-11-01T23:48:45Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAA==","apple_news_api_share_url":"https:\/\/apple.news\/AWJdDQTm9SBWPJIFQ53N5ZA","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[159,650,30,2077,526],"class_list":["post-34075","post","type-post","status-publish","format-standard","hentry","category-technology","tag-applescript","tag-applescriptobjc","tag-mac","tag-macos-12","tag-omnifocus"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/34075","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=34075"}],"version-history":[{"count":2,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/34075\/revisions"}],"predecessor-version":[{"id":34077,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/34075\/revisions\/34077"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=34075"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=34075"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=34075"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}