Bug 124039

Summary: [CSS Grid Layout] Run the content-sized tracks sizing algorithm only when required
Product: WebKit Reporter: Sergio Villar Senin <svillar>
Component: CSSAssignee: Sergio Villar Senin <svillar>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, cdumez, commit-queue, darin, dino, eflews.bot, esprehn+autocc, glenn, gyuyoung.kim, kling, koivisto, kondapallykalyan, rniwa, svillar, tony
Priority: P2 Keywords: BlinkMergeCandidate
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 112208, 123989, 124408    
Attachments:
Description Flags
Patch dino: review+, eflews.bot: commit-queue-

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
    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
Comment 1 Sergio Villar Senin 2013-11-15 06:15:14 PST
Created attachment 217044 [details]
Patch
Comment 2 EFL EWS Bot 2013-11-15 07:04:17 PST
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
Comment 3 Sergio Villar Senin 2013-11-22 01:22:44 PST
Committed r159684: <http://trac.webkit.org/changeset/159684>