[webkit-changes] [WebKit/WebKit] aab727: Gmail app keeps relaunching the GPUProcess for eac...

Chris Dumez noreply at github.com
Thu Jan 18 18:50:35 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: aab727be8e34adf97a438aa9f5a395d15f8e4c4e
      https://github.com/WebKit/WebKit/commit/aab727be8e34adf97a438aa9f5a395d15f8e4c4e
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2024-01-18 (Thu, 18 Jan 2024)

  Changed paths:
    M Source/WebKit/UIProcess/GPU/GPUProcessProxy.cpp
    M Source/WebKit/UIProcess/GPU/GPUProcessProxy.h
    M Source/WebKit/UIProcess/WebProcessPool.cpp
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm

  Log Message:
  -----------
  Gmail app keeps relaunching the GPUProcess for each email you tap on
https://bugs.webkit.org/show_bug.cgi?id=267664
rdar://121128159

Reviewed by Per Arne Vollan and Brent Fulgham.

Gmail app keeps relaunching the GPUProcess for each email you tap on. This is
inefficient and results in a delay rendering the email.

The reason this happens is that the app keeps destroying a reconstructing
WebProcessPool objects. Given that the WebProcessPool object keeps alive the
GPUProcessProxy object, doing so would results in the GPUProcessProxy getting
reconstructed and thus the GPUProcess re-launching.

To address the issue, we now keep the GPUProcessProxy alive for a minute after
the last WebProcessPool object gets destroyed. This way, if a new WebProcessPool
gets re-constructed within a minute, it will just re-use the same GPU process.
Also, for apps that don't use WebKit much, the GPU process will still exit
eventually.

* Source/WebKit/UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::keepGPUProcessAliveTemporarily):
(WebKit::WebProcessPool::~WebProcessPool):
* Source/WebKit/UIProcess/WebProcessPool.h:

Canonical link: https://commits.webkit.org/273205@main




More information about the webkit-changes mailing list