Hello Community,
I’ve developed an application that creates various calendars in multiple languages. The templates consist mostly of tables and are automatically populated with the day number, day name, calendar week, and holidays. The result is then saved as a PDF and IDML file.
When I run the application with CEP, a yearly calendar is generated in the background in about 15 seconds. After converting the application to UXP, it takes at least 4 minutes, and I can see each individual cell being filled. The DOM processing is therefore extremely slow. I haven’t changed anything in the scripts that process the DOM because I assume it behaves the same way under UXP. Or am I missing something?
Is this DOM performance issue known? Is there any information on whether it will be fixed?
DOM Actions on UXP are significantly slower than direct ExtendScript (CEP). For my plugins I only use the UXP based interactions for basic, non-critical stuff, and call out to traditional ExtendScript functions for actual processing. It makes a huge difference.
II have the feeling this issue is inherent to the way UXP has been designed and not much can be done about it… it is “easy” to program against, yes, but UI and DOM are two completely distinct domains - CEP made this quite explicit, in UXP this has been blended together, but this really is just an illusion, underwater it needs to cross the domain boundary for every single DOM call which gives significant overhead.
That is one layer. I am not sure what other layers are. For Photoshop PS team did some optimization. Like calling actions in a batch (therefore batch play) to reduce overhead. Or so called “multiGet”. PS DOM in UXP is still slow but I think ExtendScript DOM is slower, but I would need to measure it to be 100% sure.
Wow, thanks for the replies. I kind of suspected something like that. With a standard DIN A0 yearly calendar, I loop through about 1450 cells in the spreadsheet. If UXP slows everything down, I’ll lose a lot of time.
I hope CEP is around for a long time. My plugin creates about 900 calendars in various languages. I’d need weeks instead of the current 6 hours.