I am trying to get more into applescript (with JXA) to refine my workflow.
I am currently writing a little script that goes over all projects and all tasks and edits them accordingly.
The problem: editing 1 task takes almost 1 second. So when my script goes through all tasks inside the app, it can take a long time.
I debugged a bit and it seems like the actual editing (setting the property of the Task object) is what’s eating most of the time. Leaving the writes out, the entire script finishes in less than a second. I assume this is because of syncing / saving of the state after each edit but I’m not sure.
I saw that there was a
autosave property beforehand, though that seems to be gone. Is there a other way to tell omnifocus to batch edit a bunch of tasks at the same time? Something like
- Turn autosave off
- Edit all tasks
- Turn autosave on
Is using plain applescript instead of JXA faster?