Bug 313694

Summary: REGRESSION(310976@main): [build-speed][GCC-13] JSTypedArrayViewPrototype.cpp is taking 10 minutes to build.
Product: WebKit Reporter: Carlos Alberto Lopez Perez <clopez>
Component: WebKitGTKAssignee: Carlos Alberto Lopez Perez <clopez>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, spena, ysuzuki
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Carlos Alberto Lopez Perez
Reported 2026-04-29 16:05:46 PDT
It seems that with GCC 13.3.0 (default compiler version on the SDK) is taking a massive amount of time to build this UnifiedSource file. $ cat /sdk/webkit/WebKitBuild/GTK/Release/JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-f2e18ffc-30.cpp #include "runtime/JSTypedArrayViewPrototype.cpp" #include "runtime/JSTypedArrays.cpp" #include "runtime/JSWeakMap.cpp" #include "runtime/JSWeakObjectRef.cpp" #include "runtime/JSWeakSet.cpp" #include "runtime/JSWithScope.cpp" #include "runtime/JSWrapForValidIterator.cpp" #include "runtime/JSWrapperObject.cpp" $ time gcc -DBUILDING_GTK__=1 -DBUILDING_JavaScriptCore -DBUILDING_WEBKIT=1 -DBUILDING_WITH_CMAKE=1 -DBWRAP_EXECUTABLE="/usr/bin/bwrap" -DDBUS_PROXY_EXECUTABLE="/usr/bin/xdg-dbus-proxy" -DGETTEXT_PACKAGE="WebKitGTK-6.0" -DHAVE_CONFIG_H=1 -DJSC_GLIB_API_ENABLED -DJavaScriptCore_EXPORTS -DPAS_BMALLOC=1 -DSTATICALLY_LINKED_WITH_WTF -DSTATICALLY_LINKED_WITH_bmalloc -D_GLIBCXX_ASSERTIONS=1 -I/sdk/webkit/WebKitBuild/GTK/Release/JavaScriptCore/Headers -I/sdk/webkit/WebKitBuild/GTK/Release/JavaScriptCore/PrivateHeaders -I/sdk/webkit/WebKitBuild/GTK/Release -I/sdk/webkit/WebKitBuild/GTK/Release/JavaScriptCore/PrivateHeaders/JavaScriptCore -I/sdk/webkit/Source/JavaScriptCore -I/sdk/webkit/Source/JavaScriptCore/API -I/sdk/webkit/Source/JavaScriptCore/assembler -I/sdk/webkit/Source/JavaScriptCore/b3 -I/sdk/webkit/Source/JavaScriptCore/b3/air -I/sdk/webkit/Source/JavaScriptCore/bindings -I/sdk/webkit/Source/JavaScriptCore/builtins -I/sdk/webkit/Source/JavaScriptCore/bytecode -I/sdk/webkit/Source/JavaScriptCore/bytecompiler -I/sdk/webkit/Source/JavaScriptCore/dfg -I/sdk/webkit/Source/JavaScriptCore/disassembler -I/sdk/webkit/Source/JavaScriptCore/disassembler/ARM64 -I/sdk/webkit/Source/JavaScriptCore/disassembler/zydis -I/sdk/webkit/Source/JavaScriptCore/domjit -I/sdk/webkit/Source/JavaScriptCore/ftl -I/sdk/webkit/Source/JavaScriptCore/fuzzilli -I/sdk/webkit/Source/JavaScriptCore/heap -I/sdk/webkit/Source/JavaScriptCore/debugger -I/sdk/webkit/Source/JavaScriptCore/inspector -I/sdk/webkit/Source/JavaScriptCore/inspector/agents -I/sdk/webkit/Source/JavaScriptCore/inspector/augmentable -I/sdk/webkit/Source/JavaScriptCore/inspector/remote -I/sdk/webkit/Source/JavaScriptCore/interpreter -I/sdk/webkit/Source/JavaScriptCore/jit -I/sdk/webkit/Source/JavaScriptCore/llint -I/sdk/webkit/Source/JavaScriptCore/parser -I/sdk/webkit/Source/JavaScriptCore/profiler -I/sdk/webkit/Source/JavaScriptCore/runtime -I/sdk/webkit/Source/JavaScriptCore/tools -I/sdk/webkit/Source/JavaScriptCore/wasm -I/sdk/webkit/Source/JavaScriptCore/wasm/debugger -I/sdk/webkit/Source/JavaScriptCore/wasm/js -I/sdk/webkit/Source/JavaScriptCore/yarr -I/sdk/webkit/WebKitBuild/GTK/Release/JavaScriptCore/DerivedSources -I/sdk/webkit/WebKitBuild/GTK/Release/JavaScriptCore/DerivedSources/inspector -I/sdk/webkit/WebKitBuild/GTK/Release/JavaScriptCore/DerivedSources/runtime -I/sdk/webkit/WebKitBuild/GTK/Release/JavaScriptCore/DerivedSources/yarr -I/sdk/webkit/Source/JavaScriptCore/API/glib -I/sdk/webkit/WebKitBuild/GTK/Release/JavaScriptCoreGLib/DerivedSources -I/sdk/webkit/WebKitBuild/GTK/Release/JavaScriptCoreGLib/DerivedSources/jsc -I/sdk/webkit/WebKitBuild/GTK/Release/JavaScriptCoreGLib/Headers -I/sdk/webkit/Source/JavaScriptCore/inspector/remote/glib -I/sdk/webkit/WebKitBuild/GTK/Release/WTF/Headers -I/sdk/webkit/WebKitBuild/GTK/Release/bmalloc/Headers -I/sdk/webkit/WebKitBuild/GTK/Release/bmalloc/PrivateHeaders -isystem /jhbuild/install/include/glib-2.0 -isystem /jhbuild/install/lib/glib-2.0/include -isystem /jhbuild/install/include/sysprof-6 -DASSERT_ENABLED=1 -fdiagnostics-color=always -Wextra -Wall -pipe -fmax-errors=20 -Wno-odr -Wno-stringop-overread -Wno-stringop-overflow -Wno-nonnull -Wno-array-bounds -Wno-expansion-to-defined -Wno-noexcept-type -fno-unswitch-loops -Wno-subobject-linkage -Wno-psabi -Wno-misleading-indentation -Wno-maybe-uninitialized -Wundef -Wpointer-arith -Wmissing-format-attribute -Wformat-security -Wcast-align -Wno-tautological-compare -fasynchronous-unwind-tables -fdebug-types-section -fno-omit-frame-pointer -fno-strict-aliasing -fno-exceptions -fno-rtti -fcoroutines -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++23 -fPIC -fvisibility=hidden -ffp-contract=off -Werror -I/jhbuild/install/include -I/jhbuild/install/include/glib-2.0 -I/jhbuild/install/lib/glib-2.0/include -I/jhbuild/install/include/sysprof-6 -I/usr/include -pthread -MD -MT Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-f2e18ffc-30.cpp.o -MF Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-f2e18ffc-30.cpp.o.d -o Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-f2e18ffc-30.cpp.o -c /sdk/webkit/WebKitBuild/GTK/Release/JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-f2e18ffc-30.cpp real 10m8.415s user 10m6.408s sys 0m2.433s This has been tested on 312309@main on a idle machine that has a Intel 275HX. This machine was able to build WebKit in 20 minutes from scratch a few weeks ago. Taking 10 minutes alone to build this file is a huge problem because it kills the build parallelism, cmake was to wait for this to finish before continuing with the rest of the build, so the machine spends like 8 minutes in single-thread mode instead of building with all the threads.
Attachments
Carlos Alberto Lopez Perez
Comment 1 2026-04-29 16:17:37 PDT
I just checked and clang (clang-18) is able to build this very same file in 1m14.320s -- so the issue seems contained to GCC.
Carlos Alberto Lopez Perez
Comment 2 2026-04-29 16:28:59 PDT
gcc-14 builds it on 2m6.012s, so the issue is with gcc-13 (and maybe less than 13 also, didn't tested)
Carlos Alberto Lopez Perez
Comment 3 2026-04-29 17:09:54 PDT
The problem is when building runtime/JSTypedArrayViewPrototype.cpp -- all the other files in this UnifiedSource unit take less than 10 seconds to build, but JSTypedArrayViewPrototype.cpp takes 10 minutes with GCC-13
Carlos Alberto Lopez Perez
Comment 4 2026-04-29 17:55:55 PDT Comment hidden (obsolete)
Carlos Alberto Lopez Perez
Comment 5 2026-04-29 17:57:10 PDT
Bisected, the commit that caused this is 310976@main which is a re-land of 310282@main (after it was reverted on 310317@main) ([JSC] Implement galloping merge in PowerSort) Time to build runtime/JSTypedArrayViewPrototype.cpp with GCC-13 - at 310975@main: 1m16.338s - at 310976@main: ~10 minutes
Carlos Alberto Lopez Perez
Comment 6 2026-04-29 19:05:07 PDT
Simon Pena
Comment 7 2026-04-29 21:45:38 PDT
This had previously been tracked here https://bugs.webkit.org/show_bug.cgi?id=312362
EWS
Comment 8 2026-04-30 02:09:45 PDT
Committed 312349@main (85d52301a5e3): <https://commits.webkit.org/312349@main> Reviewed commits have been landed. Closing PR #63940 and removing active labels.
Carlos Alberto Lopez Perez
Comment 9 2026-04-30 02:12:02 PDT
*** Bug 312362 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.