I just experimented a bit with the new modal execution.
The documentation says:
If the modal state lasts a significant amount of time (currently more than two seconds), then a progress bar is shown
Based on my testing results, this is only true for executing separate batchPlay calls while Photoshop is in modal state. If you group up multiple descriptors in one batchPlay call, the progess bar will not show up - it might briefly flash at the end though.
I felt like there’s also some difference in execution time, so I’ve ran an example where I create 200 new layers using both approaches, 3 times each:
1) Multiple batchPlay calls
Code:
photoshop.action.batchPlay([createLayerDescriptor], {})
photoshop.action.batchPlay([createLayerDescriptor], {})
photoshop.action.batchPlay([createLayerDescriptor], {})
...
Time needed:
Run 1: 10439 milliseconds
Run 2: 10516 milliseconds
Run 3: 10522 milliseconds
(Progress bar shows up)
2) One batchPlay call
Code:
photoshop.action.batchPlay([createLayerDescriptor, createLayerDescriptor, createLayerDescriptor, ...], {})
Time needed:
Run 1: 6182 milliseconds
Run 2: 5968 milliseconds
Run 3: 5981milliseconds
(Progress bar doesn’t show up)
Looks like you can cut the time almost in half if you’re fine with not showing the progess bar.