stylo: Turn off parallelism for non-root traversals

NEW
Assigned to

Status

()

Core
CSS Parsing and Computation
P1
normal
2 months ago
2 months ago

People

(Reporter: bholley, Assigned: bholley)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

As a very rough first stab at improving the overhead measured in bug 1365682, we can at least stop using the parallelism for everything other than StyleDocument calls, which eliminates all the small traversals. Especially with lazy frame construction, most styling of new content ends running off of ProcessPendingRestyles anyway.

It's not perfect, because we may still have some large subtrees that we miss parallelizing, and we could have trivial 1-element restyles in ProcessPendingRestyles. But it's still better than what we have now, and Talos shows that it's quite a bit better than what we have now.

We can continue to tweak, but I want to get this into the tree as a starting point to improve our numbers.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=3c12397dbb7adbe4da8a50115515fc1fd67d6dbd
Created attachment 8868682 [details] [diff] [review]
Only use the parallel traversal when traversing from the root. v1
Attachment #8868682 - Flags: review?(emilio+bugs)
Priority: -- → P1
Attachment #8868682 - Flags: review?(emilio+bugs) → review+
https://github.com/servo/servo/pull/16930
You need to log in before you can comment on or make changes to this bug.