Bug 124039 - [CSS Grid Layout] Run the content-sized tracks sizing algorithm only when required
Summary: [CSS Grid Layout] Run the content-sized tracks sizing algorithm only when req...
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sergio Villar Senin
Keywords: BlinkMergeCandidate
Depends on:
Blocks: 112208 123989 124408
  Show dependency treegraph
Reported: 2013-11-08 05:09 PST by Sergio Villar Senin
Modified: 2013-11-22 01:22 PST (History)
15 users (show)

See Also:

Patch (213.50 KB, patch)
2013-11-15 06:15 PST, Sergio Villar Senin
dino: review+
eflews.bot: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergio Villar Senin 2013-11-08 05:09:03 PST
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


    Review URL: https://chromiumcodereview.appspot.com/22949002


    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.


    Review URL: https://chromiumcodereview.appspot.com/22867006
Comment 1 Sergio Villar Senin 2013-11-15 06:15:14 PST
Created attachment 217044 [details]
Comment 2 EFL EWS Bot 2013-11-15 07:04:17 PST
Comment on attachment 217044 [details]

Attachment 217044 [details] did not pass efl-wk2-ews (efl-wk2):
Output: http://webkit-queues.appspot.com/results/24128003
Comment 3 Sergio Villar Senin 2013-11-22 01:22:44 PST
Committed r159684: <http://trac.webkit.org/changeset/159684>