Bug 232768

Summary: Unify build of TestWebKitAPI/Tests/WebKitCocoa
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, mkwst, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
ews-feeder: commit-queue-
Patch
ews-feeder: commit-queue-
Patch
ews-feeder: commit-queue-
Patch
none
Patch
none
Patch ews-feeder: commit-queue-

Alex Christensen
Reported 2021-11-05 15:12:56 PDT
Unify build of TestWebKitAPI/Tests/WebKitCocoa
Attachments
Patch (398.07 KB, patch)
2021-11-05 15:13 PDT, Alex Christensen
ews-feeder: commit-queue-
Patch (381.98 KB, patch)
2021-11-05 15:40 PDT, Alex Christensen
ews-feeder: commit-queue-
Patch (389.44 KB, patch)
2021-11-05 15:44 PDT, Alex Christensen
ews-feeder: commit-queue-
Patch (394.33 KB, patch)
2021-11-05 16:01 PDT, Alex Christensen
no flags
Patch (393.91 KB, patch)
2021-11-08 17:37 PST, Alex Christensen
no flags
Patch (399.10 KB, patch)
2021-11-09 14:36 PST, Alex Christensen
ews-feeder: commit-queue-
Alex Christensen
Comment 1 2021-11-05 15:13:20 PDT
Alex Christensen
Comment 2 2021-11-05 15:40:18 PDT
Alex Christensen
Comment 3 2021-11-05 15:44:49 PDT
Alex Christensen
Comment 4 2021-11-05 16:01:02 PDT
Alex Christensen
Comment 5 2021-11-05 16:14:39 PDT
This reduces the time of "make -C Tools/TestWebKitAPI" from 86 seconds to 56 seconds
Alex Christensen
Comment 6 2021-11-08 17:37:05 PST
Tim Horton
Comment 7 2021-11-09 11:06:12 PST
Comment on attachment 443640 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=443640&action=review > Tools/TestWebKitAPI/DeprecatedGlobalValues.h:33 > +extern bool receivedScriptMessage; I do not love *this* whole thing, would be better to fix the tests to use local `__block bool`s like we often do, or maybe these names in a per-test namespace? As it stands this makes the tests oddly not self-contained. I guess it's not the worst thing, though. > Tools/TestWebKitAPI/Scripts/generate-unified-sources.sh:18 > -UnifiedSourceMmFileCount=5 > +UnifiedSourceMmFileCount=50 Why so big, and why so big only for ObjC? This is the balance between fast incremental builds and fast world builds.
Alex Christensen
Comment 8 2021-11-09 11:09:29 PST
Comment on attachment 443640 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=443640&action=review >> Tools/TestWebKitAPI/DeprecatedGlobalValues.h:33 >> +extern bool receivedScriptMessage; > > I do not love *this* whole thing, would be better to fix the tests to use local `__block bool`s like we often do, or maybe these names in a per-test namespace? As it stands this makes the tests oddly not self-contained. I guess it's not the worst thing, though. I don't love this whole thing either, but this gives us the benefits now. I called it DeprecatedGlobalValues.h because we shouldn't increase the use of this. We can go through and make all the tests only use local values and decrease the use of this file, but that's slow, low-priority work. >> Tools/TestWebKitAPI/Scripts/generate-unified-sources.sh:18 >> +UnifiedSourceMmFileCount=50 > > Why so big, and why so big only for ObjC? This is the balance between fast incremental builds and fast world builds. This patch only adds unified sources from TestWebKitAPI/Tests/WebKitCocoa which only contains .mm files, so that is the only limit that needs increasing in this patch. This is a slight overshot, but not much. It will make it so we don't need to increase this limit immediately after adding the next file.
Tim Horton
Comment 9 2021-11-09 12:26:07 PST
(In reply to Alex Christensen from comment #8) > Comment on attachment 443640 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=443640&action=review > > >> Tools/TestWebKitAPI/DeprecatedGlobalValues.h:33 > >> +extern bool receivedScriptMessage; > > > > I do not love *this* whole thing, would be better to fix the tests to use local `__block bool`s like we often do, or maybe these names in a per-test namespace? As it stands this makes the tests oddly not self-contained. I guess it's not the worst thing, though. > > I don't love this whole thing either, but this gives us the benefits now. I > called it DeprecatedGlobalValues.h because we shouldn't increase the use of > this. We can go through and make all the tests only use local values and > decrease the use of this file, but that's slow, low-priority work. Makes sense. > >> Tools/TestWebKitAPI/Scripts/generate-unified-sources.sh:18 > >> +UnifiedSourceMmFileCount=50 > > > > Why so big, and why so big only for ObjC? This is the balance between fast incremental builds and fast world builds. > > This patch only adds unified sources from TestWebKitAPI/Tests/WebKitCocoa > which only contains .mm files, so that is the only limit that needs > increasing in this patch. > This is a slight overshot, but not much. It will make it so we don't need > to increase this limit immediately after adding the next file. Oh oh oh wait, I misremembered; this isn't the "how many per bundle" count that I thought it was, this is just the total number of files. OK, fine.
Wenson Hsieh
Comment 10 2021-11-09 14:09:12 PST
(In reply to Tim Horton from comment #9) > (In reply to Alex Christensen from comment #8) > > Comment on attachment 443640 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=443640&action=review > > > > >> Tools/TestWebKitAPI/DeprecatedGlobalValues.h:33 > > >> +extern bool receivedScriptMessage; > > > > > > I do not love *this* whole thing, would be better to fix the tests to use local `__block bool`s like we often do, or maybe these names in a per-test namespace? As it stands this makes the tests oddly not self-contained. I guess it's not the worst thing, though. > > > > I don't love this whole thing either, but this gives us the benefits now. I > > called it DeprecatedGlobalValues.h because we shouldn't increase the use of > > this. We can go through and make all the tests only use local values and > > decrease the use of this file, but that's slow, low-priority work. > > Makes sense. Yeah, I think this is a tiny bit unfortunate but (in practice) a non-issue since TestWebKitAPI is relaunched for each API test. We should consider cleaning these global variables up to use local variables (or otherwise find a way to encapsulate this state per-test) so that we can parallelize API test execution in the future. > > > >> Tools/TestWebKitAPI/Scripts/generate-unified-sources.sh:18 > > >> +UnifiedSourceMmFileCount=50 > > > > > > Why so big, and why so big only for ObjC? This is the balance between fast incremental builds and fast world builds. > > > > This patch only adds unified sources from TestWebKitAPI/Tests/WebKitCocoa > > which only contains .mm files, so that is the only limit that needs > > increasing in this patch. > > This is a slight overshot, but not much. It will make it so we don't need > > to increase this limit immediately after adding the next file. > > Oh oh oh wait, I misremembered; this isn't the "how many per bundle" count > that I thought it was, this is just the total number of files. OK, fine.
Alex Christensen
Comment 11 2021-11-09 14:36:56 PST
Alex Christensen
Comment 12 2021-11-09 17:05:36 PST
Radar WebKit Bug Importer
Comment 13 2021-11-09 17:06:33 PST
Note You need to log in before you can comment on or make changes to this bug.