Skip to content

Commit

Permalink
WebGL tests are slow in debug due to sync IPC reply logging even when…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
kkinnunen-apple committed Dec 14, 2022
1 parent 544e416 commit 8f7373e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Source/WebKit/Platform/IPC/HandleMessage.h
Expand Up @@ -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;
Expand Down

0 comments on commit 8f7373e

Please sign in to comment.