Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 94e372f5f1bcd3d47e2912fb2d352e641d49a952
https://github.com/WebKit/WebKit/commit/94e372f5f1bcd3d47e2912fb2d352e641d49a952
Author: Brady Eidson <[email protected]>
Date: 2025-08-14 (Thu, 14 Aug 2025)
Changed paths:
M Source/WebKit/Platform/cocoa/WebPrivacyHelpers.h
M Source/WebKit/Platform/cocoa/WebPrivacyHelpers.mm
M Source/WebKit/UIProcess/API/Cocoa/WKContentRuleListStore.mm
M Source/WebKit/UIProcess/API/Cocoa/WKContentRuleListStorePrivate.h
M Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm
Log Message:
-----------
REGRESSION(297757@main): Layout tests can timeout on Tahoe bots
rdar://157769284
https://bugs.webkit.org/show_bug.cgi?id=297385
Reviewed by Alex Christensen.
Before this change, each ContentRuleListStore had 3 queues for various
operations.
After this change, all ContentRuleListStores shared the same global queue for
all operations.
The goal here was to coordinate all access to the directory and files on disk
for the store,
but the change had bad ramifications in our regression test environment.
When doing a `run-webkit-tests` run, we fire up many instances of
WebKitTestRunner, and each points to the
same default ContentRuleListStore on disk.
Most WebKit UI-process apps only ever have a single UI process, so this bit is
unique to running lots of WKTRs.
When there were 3 queues for store operations, the read operations were always
finishing very quickly,
even in the case where multiple WKTR instances point to the same directory.
But with the 1 global queue per-UI process, read operations are blocked on
slower writes, which are made much slower
by "multiple WKTR hammering the same file(s) with writing"
All of the above is true for all Cocoa platforms.
The timeout problem manifests on Tahoe because there, WebKit manages a built-in
ContentRuleList.
As written above, there's multiple layers to what exacerbates this problem, and
we may need to address more than one.
But the lowest hanging fruit is giving each WKTR instance its own
WKContentRuleListStore for the built-in list,
therefore removing the "multiple WKTR hammering the same file(s) with writing"
problem.
* Source/WebKit/Platform/cocoa/WebPrivacyHelpers.h:
* Source/WebKit/Platform/cocoa/WebPrivacyHelpers.mm:
(WebKit::ResourceMonitorURLsController::setContentRuleListStore):
(WebKit::ResourceMonitorURLsController::prepare):
* Source/WebKit/UIProcess/API/Cocoa/WKContentRuleListStore.mm:
(+[WKContentRuleListStore
_setContentRuleListStoreForResourceMonitorURLsControllerForTesting:]):
* Source/WebKit/UIProcess/API/Cocoa/WKContentRuleListStorePrivate.h:
* Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::cocoaPlatformInitialize):
Canonical link: https://commits.webkit.org/298729@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes