<?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>232176</bug_id>
          
          <creation_ts>2021-10-22 14:21:30 -0700</creation_ts>
          <short_desc>Improve performance of nested grids</short_desc>
          <delta_ts>2026-02-01 16:01:50 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Layout and Rendering</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>304869</dup_id>
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=125145</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=268595</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=271083</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=269558</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=302529</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=304869</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tim Nguyen (:ntim)">ntim</reporter>
          <assigned_to name="Sammy Gill">sgill26</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>bfulgham</cc>
    
    <cc>cathiechen</cc>
    
    <cc>dobiasch</cc>
    
    <cc>maggotfish</cc>
    
    <cc>mattwoodrow</cc>
    
    <cc>mendelgordons</cc>
    
    <cc>michael.zacharov</cc>
    
    <cc>punit.rathod</cc>
    
    <cc>rbuis</cc>
    
    <cc>rego</cc>
    
    <cc>rik</cc>
    
    <cc>sgill26</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>svillar</cc>
    
    <cc>tobias47n9e</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
    
    <cc>zsun</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1807880</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2021-10-22 14:21:30 -0700</bug_when>
    <thetext>See: http://exponential-layout.glitch.me

From: https://developer.chrome.com/blog/layoutng/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1810245</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-10-29 14:22:19 -0700</bug_when>
    <thetext>&lt;rdar://problem/84823492&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1900621</commentid>
    <comment_count>2</comment_count>
    <who name="Ulrich Dobiasch">dobiasch</who>
    <bug_when>2022-09-23 06:17:49 -0700</bug_when>
    <thetext>Safari 16 – still present – 15+ nested grids and the cpu is stalling</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1980978</commentid>
    <comment_count>3</comment_count>
    <who name="Michael">michael.zacharov</who>
    <bug_when>2023-09-28 08:08:40 -0700</bug_when>
    <thetext>Safari 17 – still present – 15+ nested grids and the cpu is stalling</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2012683</commentid>
    <comment_count>4</comment_count>
    <who name="Mendel Gordon">mendelgordons</who>
    <bug_when>2024-02-12 06:33:35 -0800</bug_when>
    <thetext>See https://web.archive.org/web/20211008182612/https://developer.chrome.com/blog/layoutng/ since the original link is dead 
(In reply to Tim Nguyen (:ntim) from comment #0)
&gt; See: http://exponential-layout.glitch.me
&gt; 
&gt; From: https://developer.chrome.com/blog/layoutng/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2012707</commentid>
    <comment_count>5</comment_count>
    <who name="tobias47n9e@gmail.com">tobias47n9e</who>
    <bug_when>2024-02-12 08:12:01 -0800</bug_when>
    <thetext>Just a comment regarding importance:

Would be nice to see this get higher priority. Grid is used for so many layout problems now, and the developer pain of having to remove all that just for Webkit based browsers is incredible.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2024027</commentid>
    <comment_count>6</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2024-03-26 14:56:12 -0700</bug_when>
    <thetext>I tested this post 276633@main and now this test can be pushed to 100+ without any issue on M1 Pro with 16 GB.

Change progressing this - https://commits.webkit.org/276633@main

@Sammy - should we mark this duplicate of other bug?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2026699</commentid>
    <comment_count>7</comment_count>
    <who name="Manuel Rego Casasnovas">rego</who>
    <bug_when>2024-04-08 01:38:02 -0700</bug_when>
    <thetext>(In reply to Ahmad Saleem from comment #6)
&gt; I tested this post 276633@main and now this test can be pushed to 100+
&gt; without any issue on M1 Pro with 16 GB.
&gt; 
&gt; Change progressing this - https://commits.webkit.org/276633@main
&gt; 
&gt; @Sammy - should we mark this duplicate of other bug?

I can confirm this behavior, without that patch my computer starts to struggle around adding the 15th layer (or earlier). With that patch I&apos;ve managed to add &gt;150 layers easily.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2159224</commentid>
    <comment_count>8</comment_count>
    <who name="">punit.rathod</who>
    <bug_when>2025-11-17 02:28:01 -0800</bug_when>
    <thetext>Safari 26 – still present. 

It would be good if this bug could be prioritised. We had a product which was shifting over to use a new grid layout system. Everything was fine on Chrome and Firefox. The whole site became unresponsive on Safari - spinning ball on intel CPU and extreme lag on M1 CPU. The UI refresh had to be abandoned and reverted to the old UI not using nested grids.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2159225</commentid>
    <comment_count>9</comment_count>
      <attachid>477416</attachid>
    <who name="">punit.rathod</who>
    <bug_when>2025-11-17 02:29:56 -0800</bug_when>
    <thetext>Created attachment 477416
Simple html example causing extreme lag in Safari</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2159250</commentid>
    <comment_count>10</comment_count>
    <who name="alan">zalan</who>
    <bug_when>2025-11-17 05:45:09 -0800</bug_when>
    <thetext>I can reproduce this. Sammy, any thoughts?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2159321</commentid>
    <comment_count>11</comment_count>
    <who name="Sammy Gill">sgill26</who>
    <bug_when>2025-11-17 11:03:19 -0800</bug_when>
    <thetext>Yeah I can still reproduce too. It seems like there might be a couple of different issues still going on so I&apos;ll try to look into them individually but I don&apos;t have any additional information right now.

1.) Increasing span size for the subgrid makes the page take longer to load
2.) Increasing number of subrows in the content increases the resizing jank</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2173370</commentid>
    <comment_count>12</comment_count>
    <who name="Sammy Gill">sgill26</who>
    <bug_when>2026-01-20 10:07:16 -0800</bug_when>
    <thetext>I believe this should be significantly progressed on trunk as of 305121@main. Could you please test and see if you are still able to reproduce the issue?

*** This bug has been marked as a duplicate of bug 304869 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>477416</attachid>
            <date>2025-11-17 02:29:56 -0800</date>
            <delta_ts>2025-11-17 02:29:56 -0800</delta_ts>
            <desc>Simple html example causing extreme lag in Safari</desc>
            <filename>nested_grid_performance_issue_example.html</filename>
            <type>text/html</type>
            <size>2007</size>
            <attacher>punit.rathod</attacher>
            
              <data encoding="base64">PGh0bWw+CiAgPGhlYWQ+CiAgICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoKICAgICAgLmdyaWQg
ewogICAgICAgIGRpc3BsYXk6IGdyaWQ7CiAgICAgICAgZ3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiBh
dXRvOwogICAgICB9CgogICAgICAuc3ViZ3JpZC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