Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: eadc88e2217f19653e8c73db5ac16c3939fce399 https://github.com/WebKit/WebKit/commit/eadc88e2217f19653e8c73db5ac16c3939fce399 Author: Elliott Williams <e...@apple.com> Date: 2023-09-27 (Wed, 27 Sep 2023)
Changed paths: M Source/WebCore/CMakeLists.txt M Source/WebCore/DerivedSources.make M Source/WebCore/WebCoreMacros.cmake M Source/WebCore/bindings/scripts/CodeGenerator.pm M Source/WebCore/bindings/scripts/generate-bindings-all.pl M Source/WebCore/bindings/scripts/generate-bindings.pl M Source/WebCore/testing/Internals.idl M Tools/DumpRenderTree/DerivedSources-output.xcfilelist M Tools/DumpRenderTree/DerivedSources.make M Tools/Scripts/webkitpy/bindings/main.py M Tools/TestRunnerShared/CMakeLists.txt M Tools/WebKitTestRunner/CMakeLists.txt M Tools/WebKitTestRunner/DerivedSources-output.xcfilelist M Tools/WebKitTestRunner/DerivedSources.make Log Message: ----------- Avoid File::Find during IDL generation https://bugs.webkit.org/show_bug.cgi?id=261364 rdar://99146531 Reviewed by Alexey Proskuryakov. Replace the include mechanism of generate-bindings.pl, which was performing a recursive directory search of WebCore on every invocation, with a lookup based on a precomputed list of IDL names. The Xcode-based build generates this list already, in IDLFileNamesList.txt. The CMake build does not have an equivalent list, because it invokes the generator in multiple batches (once for WebCore, WebCoreTestSupport, etc.). Change it to generate a file based on the IDLs it's generating plus any additional IDLs which must be looked up but not generated. On my M2 Max machine, this is a 21% speedup of WebCore's installhdrs time, from Time (mean ± σ): 88.534 s ± 8.544 s [User: 6.732 s, System: 1.513 s] Range (min … max): 80.570 s … 100.172 s 10 runs to Time (mean ± σ): 73.320 s ± 10.335 s [User: 4.354 s, System: 1.363 s] Range (min … max): 66.565 s … 98.368 s 10 runs * Source/WebCore/CMakeLists.txt: MockWebAuthenticationConfiguration is imported but not generated; add it to WebCoreTestSupport. * Source/WebCore/DerivedSources.make: Recognize and pass --idlFileNamesList instead of --include arguments. * Source/WebCore/WebCoreMacros.cmake: Generate the IDL file names list. * Source/WebCore/bindings/scripts/CodeGenerator.pm: (new): Store path to IDL file names list. (IDLFileForInterface): Read file names list instead of finding. * Source/WebCore/bindings/scripts/generate-bindings-all.pl: (buildDirectoryCache): Pass --idlFileNamesList argument. * Source/WebCore/bindings/scripts/generate-bindings.pl: (generateBindings): Ditto. * Source/WebCore/testing/Internals.idl: Avoid having the IDL generator parse and look up attributes that require loading a bunch of additional IDLs. This prevents CMake builds from having to track all the Apple Pay IDLs in their WebCoreTestSupport, for instance. * Tools/DumpRenderTree/DerivedSources-output.xcfilelist: * Tools/DumpRenderTree/DerivedSources.make: Generate an IDLFileNamesList.txt and use it instead of includes. * Tools/Scripts/webkitpy/bindings/main.py: (BindingsTests.generate_from_idl): (BindingsTests.generate_idl_file_names_list): Extracted logic, now called twice: once to prepare a supplemental dependency file, once to generate a list of all IDLs. (BindingsTests): (BindingsTests.generate_supplemental_dependency): (BindingsTests.run_tests): (BindingsTests.main): * Tools/TestRunnerShared/CMakeLists.txt: Stop passing IDL_INCLUDES. * Tools/WebKitTestRunner/CMakeLists.txt: Ditto. * Tools/WebKitTestRunner/DerivedSources-output.xcfilelist: * Tools/WebKitTestRunner/DerivedSources.make: Ditto DumpRenderTree changes. Canonical link: https://commits.webkit.org/268561@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes