From 8f7373eda214f9130d7c1144266ec95d35658851 Mon Sep 17 00:00:00 2001 From: Kimmo Kinnunen Date: Wed, 14 Dec 2022 02:46:17 -0800 Subject: [PATCH] WebGL tests are slow in debug due to sync IPC reply logging even when disabled https://bugs.webkit.org/show_bug.cgi?id=249219 rdar://problem/103298421 Reviewed by Cameron McCormack. When replying to a IPC sync message, do not construct log TextStream if the logging channel is disabled. Speeds up Debug build webgl/2.0.y/conformance2/state/gl-object-get-calls.html with WebGL GPUP. This test does a lot of sync messages. * Source/WebKit/Platform/IPC/HandleMessage.h: (IPC::logReply): Canonical link: https://commits.webkit.org/257842@main --- Source/WebKit/Platform/IPC/HandleMessage.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/WebKit/Platform/IPC/HandleMessage.h b/Source/WebKit/Platform/IPC/HandleMessage.h index 79eeb83b44b9..b149d2dc9ab2 100644 --- a/Source/WebKit/Platform/IPC/HandleMessage.h +++ b/Source/WebKit/Platform/IPC/HandleMessage.h @@ -109,6 +109,9 @@ void logReply(const Connection& connection, MessageName messageName, const T&... if (!sizeof...(T)) return; + if (LOG_CHANNEL(IPCMessages).state != WTFLogChannelState::On) + return; + auto stream = textStreamForLogging(connection, messageName, nullptr, ForReply::Yes); unsigned argIndex = 0;