Jump to content

Alfred5: Automation (well, the one I tested...) is slow vs native code


luckman212
 Share

Recommended Posts

Please don't get me wrong— the Automations are a very welcome addition and I am happy to have them! I understand that they are a new/early feature and will improve over time. That being said...

 

Are these AutomationTasks AppleScript based? I tried one out for a test: Identify Frontmost App. It ran about 10x slower (~5s vs 0.5s on my M1) than my hacked-together Swift-based tool frontmost (link). I understand that there's some overhead due to running the Automation via an NSAppleScript loop, but I couldn't figure out another way to iterate over it. (The reason I even checked into this at all is because I noticed the delay when executing the Automation).

 

image.png.77b2cd018ad31c4bafc8f526810d2c8b.png

 

I created an example workflow that times & compares these, it can be downloaded here for test & review.

 

I hope these can be improved and ported to native Alfred functions.

Edited by luckman212
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...