New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 691505 link

Starred by 2 users

Issue metadata

Status: Duplicate
Merged: issue 868810
Owner: ----
Closed: Sep 14
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Use non-root node for style invalidation/recalc traversal starting point

Reported by r...@opera.com, Feb 13 2017

Issue description

For style invalidation and style recalc, we always start at the document node traversing the tree. For large, and particularly wide trees, this causes unnecessary traversal of a bunch of elements if we have style recalcs far down the tree only. That's the typical case for :hover, for instance.

We mark the ancestor chain with child-needs-recalc/invalidation, but traversing down the tree, we don't know which child, so we end up traversing all siblings on every level. It's possible to improve on this by storing one or more common ancestors for elements which need an invalidation/recalc.

Simple experimentation showed an improvement from 2ms to 0.1ms hovering the table of contents links in the single-page whatwg html spec. That did not set up the bloom filters and the style sharing depth properly, so numbers are not final. Another test that was done was the PerformanceTests/CSS/ClassInvalidation.html micro benchmark, which showed 5%-10% improvement (only using start node for recalc, not invalidation).

 

Comment 1 by eco...@igalia.com, Feb 13 2017

Cc: eco...@igalia.com

Comment 2 by r...@opera.com, Feb 13 2017

Note about the html spec numbers: this is purely looking at style recalc, hit-testing is by far the slowest part here.

Comment 3 by nainar@chromium.org, Feb 14 2017

Labels: Update-Quarterly

Comment 4 by r...@opera.com, Mar 27 2017

Owner: ----
Labels: -Performance Needs-Investigation Performance-Loading
rune - how did you set up your test? Is this something we can help with? This still sounds like something worth investigating or running an experiment for. Adding one label, but if there's no activity in another 6 months, we should archive this.

Comment 6 by r...@opera.com, Sep 28 2017

It seems this was just a local branch which got deleted. I'll try to resurrect it.

Labels: Code-Invalidation

Comment 8 by shend@chromium.org, Nov 27 2017

Labels: HardBug
Marking as HardBug as it's difficult to work on without a test case.
Labels: -Update-Quarterly
Mergedinto: 868810
Status: Duplicate (was: Available)
Done in 868810.

Sign in to add a comment