commit | d2a5f8df74f00436497521a1473dc5e6d3c8cb2d | [log] [tgz] |
---|---|---|
author | Kevin McNee <mcnee@chromium.org> | Thu Jan 25 01:10:51 2024 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Jan 25 01:10:51 2024 |
tree | 3930cd92e002d7866c39b2703df66a38d1c45e39 | |
parent | ec8eecd43e984630a8a15195a2dd58c987462f80 [diff] |
Reduce memory usage of NavigationPredictor AnchorElementData NavigationPredictor stores a map of information about anchor elements which can grow quite large, especially for long lived pages with many anchors. The following fields are not used and are now removed: ratio_visible_area, ratio_distance_center_to_visible_top, ratio_distance_root_bottom. We change AnchorElementData to no longer store the blink::mojom::AnchorElementMetrics sent by the renderer, but have fields to only store the required information. Fields that do not need to be stored are omitted. Some fields can use a smaller type to store the necessary information (e.g. the font size is bucketed, and only needs 1 byte to represent possible values). bools are packed together with bit fields. Fields are arranged to reduce the padding needed for alignment. Using base::trace_event::EstimateMemoryUsage, the memory usage for the youtube home page was 56,480 bytes. With this change, it's reduced to 44,960 bytes. Bug: 1506262, 1419556 Change-Id: Ie430df1626b44ef80af6715f35d91b5f807f24d6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5234754 Reviewed-by: Jeremy Roman <jbroman@chromium.org> Reviewed-by: Simon Pelchat <spelchat@chromium.org> Commit-Queue: Kevin McNee <mcnee@chromium.org> Reviewed-by: danakj <danakj@chromium.org> Cr-Commit-Position: refs/heads/main@{#1251839}
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.