
I have written a small test case for investigating performance bottlenecks in extendscript environment. You can get the latest script version here or scroll on side bar.
Of course, common optimization techniques apply in ExtendScript too. Function calling and object creation are costly operations. Local value access is faster than property access. Caching calculations outside cycles, arrays over objects, etc. However the main speed clog is adding/changing stuff on Artboard.
Full article is here: https://medium.com/@gontis/extendscript-performance-tips-9b5315697e9f