commit | 017b67704ac5c26b60a3674866a2325c8db020cd | [log] [tgz] |
---|---|---|
author | Koji Ishii <kojii@chromium.org> | Tue Jul 31 18:29:30 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Tue Jul 31 18:29:30 2018 |
tree | 7d4402ed2c284b4238734b413ecbee61b32c1c5e | |
parent | 74ab20630261a61028f579843b6a78e5a5ee39c3 [diff] |
[LayoutNG] Estimate the capacity of NGInlineItemsBuilder Currently, 50 to 60% of CollectInlines are spent in ExpandCapacity to reallocate the vector buffer. This patch makes rough estimation from the number of direct children to reduce the number of reallocations. Currently, slow tests such as storage/indexdb/* creates more than 1,000 items by appending the test results in <span></span><br> structure. This patch reduces vector allocation in such cases to once or twice. Bug: 636993 Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng Change-Id: I2b5b1462dc59091cc534a2f143b54567d31b863a Reviewed-on: https://chromium-review.googlesource.com/1155268 Reviewed-by: Emil A Eklund <eae@chromium.org> Commit-Queue: Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#579486}
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 .