Make hit test on culled inline faster
This patch changes |LayoutInlineCollector| to use |IsDescendantOf()| instead of using |HashSet<T>| to make |SelftFragmentsOf()|, which is used by hit testing and others, faster. I found the slowness of |LayoutInlineCollector| by CPU profiling[1] where |HashSet<T>::insert()| consumes most of time. So, it seems traversing fragment tree + LayoutObject::IsDescendnatOf()| is faster than two times of traversing fragment tree + |HashSet<T>::insert()|. [1] https://bit.ly/2pXQbcE Bug: 1008523 Change-Id: I825197f2b85fd2ef573e8ff159ddf966489361be Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1847602 Auto-Submit: Yoshifumi Inoue <yosin@chromium.org> Commit-Queue: Koji Ishii <kojii@chromium.org> Reviewed-by:Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#704102}
Showing
Please register or sign in to comment