[Webkit-unassigned] [Bug 231031] REGRESSION (Safari 15): WebGL Video Texture Performance Regression - Looks GPU-process related

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 5 08:24:06 PST 2022


https://bugs.webkit.org/show_bug.cgi?id=231031

--- Comment #10 from Simon Taylor <simontaylor1 at ntlworld.com> ---
Created attachment 448389

  --> https://bugs.webkit.org/attachment.cgi?id=448389&action=review

Screenshot of System Trace from Instruments

To correct my earlier comment - it does look like the optimization to skip much of the work if the frame hasn't changed is now in place in iOS 15.2, so thanks for that.

I've attached an Instruments screenshot marked up with the texImage2D calls in two frames. You can see the second call involves significantly less work, but both do end up blocking the main thread for IPC with the GPU Process. Probably unavoidable with media decode running in the GPU Process and WebGL in the content process, I suppose.

There's a couple of other thread-blocking calls back in the content process (such as the [_MTLCommandBuffer waitUntilScheduled] shown in the screenshot - another one of those is responsible for the block before too).

Sharing in the hope there might be some quick wins to be had (or a way to move some of this work out of the JS texImage2D call). Sounds like better performance would come if/when WebGL is also moved into the GPU Process, so feel free to close this if there's nothing else that can be done to improve things with the split-process model.

As an aside, I tried createImageBitmap(video) too in the hope it would kick off the conversion process and resolve the promise with effectively a handle to the converted RGBA texture, but it seems to resolve quickly and most of the actual work still happens in the following texImage2d(imageBitmap) call.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220105/cb440bab/attachment.htm>


More information about the webkit-unassigned mailing list