adobe-photoshop / generator-core

Core Node.js library for Adobe Photoshop CC's Generator extensibility layer
MIT License
692 stars 97 forks source link

New 'shared engine' message type when sending JSX to photoshop #381

Closed mcilroyc closed 7 years ago

mcilroyc commented 7 years ago

The current Photoshop interface completely refreshes the extendscript engine each time generator executes a script. This adds significant overhead that is especially noticeable during startup while generator is initializing itself. A recent change in photoshop allows use of a new message type, supplied in the message header, that causes photoshop to use a shared extendscript engine.

This change is not in the shipping version of photoshop.

This PR provides an amended API for specifying the shared-engine-compatibililty of a given JSX string or file, and uses the new PS command message type when appropriate. The existing methods will continue to use a non-shared engine by default, but an additional, optional parameter is now accepted.

Note: the other known instances of "unsafe" JSX scripts are in svgomg. Work has been started to update those scripts, but it is not strictly necessary.

pineapplespatula commented 7 years ago

@mcilroyc 🔂

Jolg42 commented 7 years ago

Nice! @mcilroyc is it gonna be available in the next big release of Photoshop? (2018?)

joelrbrandt commented 7 years ago

Neat-o

pineapplespatula commented 7 years ago

Thanks!

mcilroyc commented 7 years ago

@Jolg42 I can't commit to that, but we will communicate release notes ahead of the next release.

Jolg42 commented 7 years ago

I understand 😉 Thanks!