Bug 239488

Summary: REGRESSION(r292803) WinCairo GPU process significant performance drop
Product: WebKit Reporter: Fujii Hironori <Hironori.Fujii>
Component: New BugsAssignee: Fujii Hironori <Hironori.Fujii>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: kkinnunen
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 239494    
Bug Blocks:    
Attachments:
Description Flags
WIP patch
none
Patch kkinnunen: review+

Fujii Hironori
Reported 2022-04-19 00:55:40 PDT
WinCairo WebKit2 significant performance regression 1. Start WinCairo WebKit2 MiniBrowser 2. Browsing some web sites Very slow. r292784 Good r292803 Bad
Attachments
WIP patch (1021 bytes, patch)
2022-04-20 21:27 PDT, Fujii Hironori
no flags
Patch (1.89 KB, patch)
2022-04-20 22:46 PDT, Fujii Hironori
kkinnunen: review+
Fujii Hironori
Comment 1 2022-04-19 13:22:16 PDT
r292803 caused this bug. Bug 238516 – RemoteRenderingBackend should have dedicated IPC::Connection for out-of-stream messages Disabling GPU process doesn't seem to work around this issue. > reg add HKEY_CURRENT_USER\Software\WebKit /v gpu_process_canvas_rendering /t REG_DWORD /d 0 /f > reg add HKEY_CURRENT_USER\Software\WebKit /v gpu_process_webgl /t REG_DWORD /d 0 /f
Fujii Hironori
Comment 2 2022-04-19 14:04:46 PDT
(In reply to Fujii Hironori from comment #1) > Disabling GPU process doesn't seem to work around this issue. > > > reg add HKEY_CURRENT_USER\Software\WebKit /v gpu_process_canvas_rendering /t REG_DWORD /d 0 /f > > reg add HKEY_CURRENT_USER\Software\WebKit /v gpu_process_webgl /t REG_DWORD /d 0 /f This was wrong. These flags were removed. Bug 238766 – Remove GPU process system feature flags I think there is no good way to disable GPU process for WinCairo. I applied the following patch to disable GPU process, and confirmed it worked around the issue. diff --git a/Source/WebKit/UIProcess/WebPageProxy.cpp b/Source/WebKit/UIProcess/WebPageProxy.cpp index 257a744f94c2..37daefef8ca3 100644 --- a/Source/WebKit/UIProcess/WebPageProxy.cpp +++ b/Source/WebKit/UIProcess/WebPageProxy.cpp @@ -8455,14 +8455,14 @@ WebPageCreationParameters WebPageProxy::creationParameters(WebProcessProxy& proc // FIXME: This is also being passed over the to WebProcess via the PreferencesStore. parameters.shouldCaptureVideoInGPUProcess = preferences().captureVideoInGPUProcessEnabled(); // FIXME: This is also being passed over the to WebProcess via the PreferencesStore. - parameters.shouldRenderCanvasInGPUProcess = preferences().useGPUProcessForCanvasRenderingEnabled(); + parameters.shouldRenderCanvasInGPUProcess = false; // FIXME: This is also being passed over the to WebProcess via the PreferencesStore. parameters.shouldRenderDOMInGPUProcess = preferences().useGPUProcessForDOMRenderingEnabled(); // FIXME: This is also being passed over the to WebProcess via the PreferencesStore. parameters.shouldPlayMediaInGPUProcess = preferences().useGPUProcessForMediaEnabled(); #if ENABLE(WEBGL) // FIXME: This is also being passed over the to WebProcess via the PreferencesStore. - parameters.shouldRenderWebGLInGPUProcess = preferences().useGPUProcessForWebGLEnabled(); + parameters.shouldRenderWebGLInGPUProcess = false; #endif // FIXME: This is also being passed over the to WebProcess via the PreferencesStore.
Fujii Hironori
Comment 3 2022-04-20 13:26:48 PDT
I don't know what is the trigger causes this performance drop. 1. Start WinCairo WK2 MiniBrowser 2. Go to https://webkit.org/ 3. Scrolling the page is smooth 4. Go to https://www.reddit.com/ 5. loading the page and scrolling the page is very slow 6. Push Back button to go to https://webkit.org/ 7. loading the page and scrolling the page is very slow
Fujii Hironori
Comment 4 2022-04-20 18:47:16 PDT
If a page has a canvas element, WebPage::ensureRemoteRenderingBackendProxy creates m_remoteRenderingBackendProxy. WebPage::finalizeRenderingUpdate calls m_remoteRenderingBackendProxy->finalizeRenderingUpdate() if m_remoteRenderingBackendProxy is available. RemoteRenderingBackendProxy::finalizeRenderingUpdate sends a FinalizeRenderingUpdate stream message. RemoteRenderingBackendProxy::streamConnection has 3 seconds tiemout. This is causing the performance drop.
Fujii Hironori
Comment 5 2022-04-20 21:27:17 PDT
Created attachment 458039 [details] WIP patch
Fujii Hironori
Comment 6 2022-04-20 21:30:58 PDT
RemoteRenderingBackendProxy::streamConnection waits for DidCreateWakeUpSemaphoreForDisplayListStream message for 3 seconds. But, DidCreateWakeUpSemaphoreForDisplayListStream message doesn't come because the dedicated connection isn't opened in the server side.
Fujii Hironori
Comment 7 2022-04-20 22:46:46 PDT
Kimmo Kinnunen
Comment 8 2022-04-20 22:52:14 PDT
Comment on attachment 458040 [details] Patch The issue that prompted this was fixed in bug 239399 Note: WinCairo could start building and testing with ENABLE_IPC_TESTING, we're working on improving the test coverage of IPC
Fujii Hironori
Comment 9 2022-04-20 23:44:59 PDT
Oh, I didn't notice it. Thank you. *** This bug has been marked as a duplicate of bug 239399 ***
Kimmo Kinnunen
Comment 10 2022-04-21 02:43:40 PDT
I think this is still a good fix, you may reconsider not duping but just landing the fix.
Note You need to log in before you can comment on or make changes to this bug.