I spent some time today investigating the performance of the cascade. It's a bit hard to profile given the structure of the callgraph, but by my estimation we spend about 5% of the total cascade time in iter_declarations, and presumably a lot of that is acquiring the locks. Simon, will your work on per-document locks solve this?
Hopefully! It’s hard to say without trying it. I have a supporting library here: https://github.com/servo/servo/compare/arc-shared-rw-lock Next I’ll port the style system code to use it instead of per-CSSOM-object locks.
That's awesome! That work will allow us to stop pre-traversing the rule tree collecting lock guards, right?
Cool! Looking forward to seeing it in action. :-) Assuming it works, I'd be in favor of iterating on it for a little bit in s/s, and then hoisting it to crates.io. +1 for removing our OwningHandle usage if we can, given the uncertainty in .  https://github.com/Kimundi/owning-ref-rs/pull/15