<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>313694</bug_id>
          
          <creation_ts>2026-04-29 16:05:46 -0700</creation_ts>
          <short_desc>REGRESSION(310976@main): [build-speed][GCC-13] JSTypedArrayViewPrototype.cpp is taking 10 minutes to build.</short_desc>
          <delta_ts>2026-04-30 02:12:02 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Carlos Alberto Lopez Perez">clopez</reporter>
          <assigned_to name="Carlos Alberto Lopez Perez">clopez</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>spena</cc>
    
    <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2206022</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2026-04-29 16:05:46 -0700</bug_when>
    <thetext>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 &quot;runtime/JSTypedArrayViewPrototype.cpp&quot;
#include &quot;runtime/JSTypedArrays.cpp&quot;
#include &quot;runtime/JSWeakMap.cpp&quot;
#include &quot;runtime/JSWeakObjectRef.cpp&quot;
#include &quot;runtime/JSWeakSet.cpp&quot;
#include &quot;runtime/JSWithScope.cpp&quot;
#include &quot;runtime/JSWrapForValidIterator.cpp&quot;
#include &quot;runtime/JSWrapperObject.cpp&quot;


$ time gcc  -DBUILDING_GTK__=1 -DBUILDING_JavaScriptCore -DBUILDING_WEBKIT=1 -DBUILDING_WITH_CMAKE=1 -DBWRAP_EXECUTABLE=&quot;/usr/bin/bwrap&quot; -DDBUS_PROXY_EXECUTABLE=&quot;/usr/bin/xdg-dbus-proxy&quot; -DGETTEXT_PACKAGE=&quot;WebKitGTK-6.0&quot; -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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2206026</commentid>
    <comment_count>1</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2026-04-29 16:17:37 -0700</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2206034</commentid>
    <comment_count>2</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2026-04-29 16:28:59 -0700</bug_when>
    <thetext>gcc-14 builds it on 2m6.012s, so the issue is with gcc-13 (and maybe less than 13 also, didn&apos;t tested)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2206044</commentid>
    <comment_count>3</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2026-04-29 17:09:54 -0700</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2206058</commentid>
    <comment_count>4</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2026-04-29 17:55:55 -0700</bug_when>
    <thetext>Bisected, the commit that caused this is 310975@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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2206059</commentid>
    <comment_count>5</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2026-04-29 17:57:10 -0700</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2206078</commentid>
    <comment_count>6</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2026-04-29 19:05:07 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/63940</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2206112</commentid>
    <comment_count>7</comment_count>
    <who name="Simon Pena">spena</who>
    <bug_when>2026-04-29 21:45:38 -0700</bug_when>
    <thetext>This had previously been tracked here https://bugs.webkit.org/show_bug.cgi?id=312362</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2206161</commentid>
    <comment_count>8</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-04-30 02:09:45 -0700</bug_when>
    <thetext>Committed 312349@main (85d52301a5e3): &lt;https://commits.webkit.org/312349@main&gt;

Reviewed commits have been landed. Closing PR #63940 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2206163</commentid>
    <comment_count>9</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2026-04-30 02:12:02 -0700</bug_when>
    <thetext>*** Bug 312362 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>