[FCP++] Performance: avoid creating ID for unrelated nodes
FCP++ uses IdForNode() to get node ID. But IdForNode() has the side effect of creating an id for node if it doesn't exist. As FCP++ uses IdForNode() for every removed node regardless of whether it's content node, it's a costly operation. FCP++ only cares about the removal of the nodes that have already been recorded. This indicates that the nodes already have node id. Based on this characteristic, FCP++ can ignore the nodes that do not have node id, so as to reduce cost. This CL is to implement this idea. Bug: 945405 Change-Id: I03602d3d79f5f5ed4c087a7a2cf0a44aec1accbb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1540263 Commit-Queue: Liquan (Max) Gu <maxlg@chromium.org> Reviewed-by:Xianzhu Wang <wangxianzhu@chromium.org> Cr-Commit-Position: refs/heads/master@{#644869}
Showing
Please register or sign in to comment