Bug 232176

Summary: Improve performance of nested grids
Product: WebKit Reporter: Tim Nguyen (:ntim) <ntim>
Component: Layout and RenderingAssignee: Sammy Gill <sgill26>
Status: NEW    
Severity: Normal CC: agafvv, ahmad.saleem792, bfulgham, cathiechen, dobiasch, maggotfish, mattwoodrow, mendelgordons, michael.zacharov, punit.rathod, rbuis, rego, rik, sgill26, simon.fraser, svillar, tobias47n9e, webkit-bug-importer, zalan, zsun
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=125145
https://bugs.webkit.org/show_bug.cgi?id=268595
https://bugs.webkit.org/show_bug.cgi?id=271083
https://bugs.webkit.org/show_bug.cgi?id=269558
https://bugs.webkit.org/show_bug.cgi?id=302529
Attachments:
Description Flags
Simple html example causing extreme lag in Safari none

Tim Nguyen (:ntim)
Reported 2021-10-22 14:21:30 PDT
Attachments
Simple html example causing extreme lag in Safari (1.96 KB, text/html)
2025-11-17 02:29 PST, punit.rathod
no flags
Radar WebKit Bug Importer
Comment 1 2021-10-29 14:22:19 PDT
Ulrich Dobiasch
Comment 2 2022-09-23 06:17:49 PDT
Safari 16 – still present – 15+ nested grids and the cpu is stalling
Michael
Comment 3 2023-09-28 08:08:40 PDT
Safari 17 – still present – 15+ nested grids and the cpu is stalling
Mendel Gordon
Comment 4 2024-02-12 06:33:35 PST
tobias47n9e@gmail.com
Comment 5 2024-02-12 08:12:01 PST
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.
Ahmad Saleem
Comment 6 2024-03-26 14:56:12 PDT
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?
Manuel Rego Casasnovas
Comment 7 2024-04-08 01:38:02 PDT
(In reply to Ahmad Saleem from comment #6) > 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? I can confirm this behavior, without that patch my computer starts to struggle around adding the 15th layer (or earlier). With that patch I've managed to add >150 layers easily.
punit.rathod
Comment 8 2025-11-17 02:28:01 PST
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.
punit.rathod
Comment 9 2025-11-17 02:29:56 PST
Created attachment 477416 [details] Simple html example causing extreme lag in Safari
alan
Comment 10 2025-11-17 05:45:09 PST
I can reproduce this. Sammy, any thoughts?
Sammy Gill
Comment 11 2025-11-17 11:03:19 PST
Yeah I can still reproduce too. It seems like there might be a couple of different issues still going on so I'll try to look into them individually but I don'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
Note You need to log in before you can comment on or make changes to this bug.