stylo: Turn off parallelism for non-root traversals

Assigned to



CSS Parsing and Computation
2 months ago
2 months ago


(Reporter: bholley, Assigned: bholley)


(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)



(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.
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+
You need to log in before you can comment on or make changes to this bug.