WinCairo WebKit2 significant performance regression 1. Start WinCairo WebKit2 MiniBrowser 2. Browsing some web sites Very slow. r292784 Good r292803 Bad
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
(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.
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
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.
Created attachment 458039 [details] WIP patch
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.
Created attachment 458040 [details] Patch
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
Oh, I didn't notice it. Thank you. *** This bug has been marked as a duplicate of bug 239399 ***
I think this is still a good fix, you may reconsider not duping but just landing the fix.