commit | c156dc3763b001a5327ae9453222ae73bd2520e0 | [log] [tgz] |
---|---|---|
author | Morten Stenshorne <mstensho@chromium.org> | Tue Aug 29 23:42:38 2023 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Aug 29 23:42:38 2023 |
tree | cec09136ad8c61a037319a46a712ff637949c2db | |
parent | 4c56ce302dcacd384784e69a6fe553cf26138e76 [diff] |
Avoid O(n^2) in layout of many fragmentainers. We only need to know the stitched LayoutBox size of all the fragments combined when we're done with the last fragment, so avoid going through every fragment for every fragment. We used to end up in LayoutBox::ComputeSize() (which loops through every fragment) for every fragment. This improves perf_tests/layout/multicol/tall-content-short-columns.html performance from 0.77 runs per second to 1.15 runs per second. That's about 50% faster, which isn't a lot, but there are other O(n^2) issues which play a bigger role here, especially during pre-paint. We don't have a separate test for just layout, but that shouldn't be necessary, either. Bug: 1476776 Change-Id: Ie9ca7ea5b6decfd3c775217548bb4482bdb5cfec Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4821786 Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Reviewed-by: Kent Tamura <tkent@chromium.org> Cr-Commit-Position: refs/heads/main@{#1189824}
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.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.