Here is my first post on this forum. I started some UXP tests in order to control Photoshop from an external device, like a midi controller.
Basically the goal is to control a continous settings as brush Size
, or transparency of a layer using an external potentiometer.
I actually succeeded in having quickly some nice result, but I am facing a performance issue.
Photoshop cannot handle enough “batchPlay / sec” in order to have a smooth control of the app in realtime : UI delays, lag, freeze . I which i could improve this performance issue
Is changing UXP to CEP, or C++ could solve the problem ?
Or do have any idea to do it in a cleaner way that batchPlay ?
This sounds super interesting, but a bit out of my wheelhouse to offer much guidance though!
As I understand it batchPlay is the closest to “bare metal” you can get and as such is the fastest, at least in terms of UXP - I couldn’t speak as to C++.
CEP is a dead end as it will be deprecated in the future.
But it strikes me that commercial products already exist that do what you are attempting and so it’s evidently possible.
@Maher I am not sure about " narrow down the cause".
Actually I am reading potentiometer value through an external app that send websocket to my plugin.
Then my plugin execute batchPlay, and, for exemple, change the brush size.
Logging the output works well, but if I increase the rate of data, i got a warning " too much promises"
Let’s say that the process works, but if the frequency of changing the size brush is over 15 times / sec , then delays, freeze appears.
I am not sure about the “modal state”, but my plugin has an UI, and I want the settings changed from the plugin affects the photoshop UI in realtime ( I want to see the sizeBrush slider on the UI move in realtime )
Thank you Erin
I haven’t try C++ plugin even if C++ is familiar to me.
I was convinced that javascript UXP was an easiest way to start plugin, but if C++ is the only solution …