I have been testing a batch processing UXP plugin that I have in development. At times the batch processing is <5 seconds per image. Other times it is as high as 18 seconds per image running the same exact batch on the same folder of images. This is not being driven by RAM or scratch disk usage. there is plenty of available RAM for Photoshop when this happens.
I found that when the UXP batches are running fast, in Task Manager, Photoshop doesn’t have anything in the dropdown next to it. When it starts slowing down, there are always instances of Microsoft Edge WebView 2 running underneath Photoshop in the dropdown. I have seen anywhere from 1 - 7 of these at once. The time there were 7 instances was when the batch was running at 18 seconds per image.
There seems to be a direct correlation between how many instances of Microsoft Edge WebView 2 there are running and how slow the UXP batches run.
Doing a google search it appears others are seeing this too, although not specifically related to UXP. I’m pretty sure my plugins are not doing anything to cause these, at least not intentionally.
Does anyone know why these instances of Edge WebView appear and why Photoshop runs so slow when they do appear?
Microsoft Edge WebView2 supports webview instances inside of UXP-powered features. Right now this is first-part only, but will be extending to include third-party plugins shortly. Those processes don’t get launched until a panel needs it, so it would be good to validate your workflow to see if you’re triggering something that might kick off a webview.
Right now the first-party features that utilize webview are:
Sharing & Comments
Capture
Stock purchase flow
These should not negatively impact performance in general, but I’d ask if you have any panels open while the batch process is running – showing/hiding (especially if the webview has to initialize) can be quite expensive, so if there’s a lot of changing how the workspace looks, I could imagine some performance impacts. 18s seems quite extreme though, so it’d be good to see if it’s occurring in other cases.
To test to see if it was linked to any plugins, I removed all Plugins, both my own and other developers plugins. The webView instances will still show up after restarting Photoshop without any plugins installed. So I know it isn’t linked to any plugins.
Most of the time, they are showing up right after restarting Photoshop, even before doing anything at all inside of Photoshop. They just startup when Photoshop starts up. However, there are some times when Photoshop starts up without them and they show up later. I will try to see if for those times when it shows up later if there is a link to any specific tool I am using.
Also, I never opened Sharing/Comments, Capture, or Stock Photo Purchases. So it isn’t related to me using those features.
When they do pop up, it makes UXP unbearably slow though. My plugins all do batch automation and they have a stats timers that prompts the time per image. The batch of same images were 3 seconds when WebView wasn’t running to as high as 18 seconds when there were 7 instances of WebView. The slowdown is very repeatable too. It is always fast without them running and always slower with them running. The more instances there are, the slower it is.
Also, I have had quite a few of my users complain of similar slow downs recently too. Their issues also seem to be related to the Edge WebView instances.
Since my plugins do batch processing, and give time stats, it is really obvious to the users when they slow down… and they are quick to let me know about it
I can’t say if I have the same slowdown…but I can confirm that in my task manager that several (6-7) webview instances open with Photoshop, and I never touch any of those 3 listed first-party windows.
Just an update on this. The lagging seems fixed in Photoshop 23.2.1. The multiple WebView instances still pop up (have seen up to 6 in 23.2.1). However, they don’t seem to be slowing it down like they were in 23.2.0.