commit | 155da859970e7404d851f611da9ededd432c5801 | [log] [tgz] |
---|---|---|
author | Ian Kilpatrick <ikilpatrick@chromium.org> | Thu Mar 14 16:01:20 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Mar 14 16:01:20 2019 |
tree | e548ca9950c9f9daa7b2400beab1011849fe64bb | |
parent | 7184ac508fd0d7c4d3d04c433b94da31d0f57af7 [diff] |
[LayoutNG] Add shrink-to-fit caching optimization. We can detect if an element was sized to its min-content by seeing if the available inline-size given in the first layout pass is smaller than the inline-size of the fragment. We can therefore skip layout if the new available inline-size is also smaller than the fragment. Likewise we can detect if an element was sized to its max-content by seeing if the available inline-size given in the first layout pass is larger than the inline-size of the fragment. We also can therefore skip layout if the new available inline-size is also larger than the fragment. This has a suprising effect of the desktop loading benchmarks of ~3-4%. (I ran them multiple times b/c i didn't believe it). This also speeds up a microbenchmark testing for this kind of optimization by a lot. Bug: 635619 Change-Id: Ie209a18bd0027fde0e34f45eaff58339aea9227f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1481600 Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org> Reviewed-by: Morten Stenshorne <mstensho@chromium.org> Reviewed-by: Christian Biesinger <cbiesinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#640775}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .