[webkit-changes] [WebKit/WebKit] eb5031: Cherry-pick 283414 at main (cf8f5f540b30). https://bu...
Michael Catanzaro
noreply at github.com
Mon Sep 16 01:56:05 PDT 2024
Branch: refs/heads/webkitglib/2.46
Home: https://github.com/WebKit/WebKit
Commit: eb5031b47e5de0ace92debcedc01f7a80c9ec45b
https://github.com/WebKit/WebKit/commit/eb5031b47e5de0ace92debcedc01f7a80c9ec45b
Author: Michael Catanzaro <mcatanzaro at redhat.com>
Date: 2024-09-16 (Mon, 16 Sep 2024)
Changed paths:
M Source/WebKit/UIProcess/Launcher/ProcessLauncher.h
M Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp
Log Message:
-----------
Cherry-pick 283414 at main (cf8f5f540b30). https://bugs.webkit.org/show_bug.cgi?id=279026
REGRESSION(281488 at main): [WPE][GTK] Process launching is slow
https://bugs.webkit.org/show_bug.cgi?id=279026
Reviewed by Carlos Garcia Campos and Adrian Perez de Castro.
ProcessLauncher is already designed to support asynchronous process
launching, but the GLib implementation ignores this and does everything
synchronously. Previously this was OK because
ProcessLauncher::launchProcess would return immediately after the
subprocess is spawned, without waiting for any code to execute in the
subprocess. Apparently that's fast enough in practice. But after my
changes in 281488 at main, we now additionally wait for the subprocess to
send credentials to the parent via a socket. That turns out to be
drastically slower than actually spawning the process.
The blocking is unnecessary because the code was already carefully
structured to allow asynchronicity. I just failed to take advantage of
it.
Instead, return immediately after spawning the subprocess. Then, wait
until the socket is ready before reading the pid from it. Now the read
can complete instantaneously instead of blocking the UI process.
* Source/WebKit/UIProcess/Launcher/ProcessLauncher.h:
* Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:
(WebKit::ProcessLauncher::launchProcess):
Canonical link: https://commits.webkit.org/283414@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list