We're running it for every single track even if it isn't content sized. Basically we need to keep track of the content-sized tracks and run the algorithm only for them. Fixing this involves merging these two commits from Blink: CSS Grid Layout] Avoid preferred logical widths' recomputations The code runs the content-sized track sizing algorithm all the time, which forces a layout even when the track is not content-sized. This change makes us bail out if we know we don't need to run the algorithm. Note that it will not help content sized grid tracks. This speeds up PerformanceTests/Layout/fixed-grid-lots-of-data.html from ~28.5 run/s to ~585 run/s by avoiding a lot of unneeded layouts. The baselines change comes from triggering less layouts, which changes the frame rects between 2 subsequent layouts thus changing the repaint rectangles. BUG=225892 Review URL: https://chromiumcodereview.appspot.com/22949002 and Content-sized resolution should only happen on content-sized tracks The current code would always try to run the content sized algorithm regardless of whether this was needed. On top of it, it would iterate over ALL grid items, even if only a small set of the tracks were content-sized. This change stores of which tracks are content-sized and use the internal grid to only iterate over these tracks. On a Z620, this speeds up PerformanceTests/Layout/fixed-grid-lots-of-data.html from about 550 runs / sec to 830 runs / sec. BUG=273238 Review URL: https://chromiumcodereview.appspot.com/22867006
Created attachment 217044 [details] Patch
Comment on attachment 217044 [details] Patch Attachment 217044 [details] did not pass efl-wk2-ews (efl-wk2): Output: http://webkit-queues.appspot.com/results/24128003
Committed r159684: <http://trac.webkit.org/changeset/159684>