Batch edit big amount of tasks very slow // turn autosave off?

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

  1. Turn autosave off
  2. Edit all tasks
  3. Save
  4. Turn autosave on

Is using plain applescript instead of JXA faster?

2 Likes

Hi,

Did you ever figure out the answer to this question? I’m having the same issue. I can watch a script that runs through a long list of items tick very slowly through them one by one.
Thanks for any thoughts on this.

It’s in the hidden preferences- never tried it myself: