[FragmentItem] Merge items_ and offsets_ vector in NGFragmentItemsBuilder
To improve the performance of |NGFragmentItemsBuilder|: 1. This patch merges two vectors (items and offsets) to one. This is the same as r664158 <crrev.com/c/1633019> did to |NGContainerFragmentBuilder|. 2. This patch gives an inline size to the vector to reduce memory allocations. The allocations of these two vectors is hot in text-heavy benchmarks. This patch improves: * chapter-reflow by ~5%. * line-layout-repeat-append by ~15%. These tests are currently slower when FragmentItem is enabled. https://pinpoint-dot-chromeperf.appspot.com/job/11669b69e20000 Bug: 982194 Change-Id: I2c787438abc4c2484fe9ae432447ecd30ee4a0fe Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2142668 Commit-Queue: Koji Ishii <kojii@chromium.org> Reviewed-by:Ian Kilpatrick <ikilpatrick@chromium.org> Reviewed-by:
Yoshifumi Inoue <yosin@chromium.org> Cr-Commit-Position: refs/heads/master@{#758469}
Showing
Please register or sign in to comment