Closed
Bug 1339703
Opened 8 years ago
Closed 8 years ago
stylo: iter_declarations is slow
Categories
(Core :: CSS Parsing and Computation, defect, P1)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
People
(Reporter: bholley, Assigned: SimonSapin)
References
(Blocks 1 open bug)
Details
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?
Reporter | ||
Updated•8 years ago
|
Flags: needinfo?(simon.sapin)
Assignee | ||
Comment 1•8 years ago
|
||
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.
Flags: needinfo?(simon.sapin)
Comment 2•8 years ago
|
||
That's awesome! That work will allow us to stop pre-traversing the rule tree collecting lock guards, right?
Reporter | ||
Comment 3•8 years ago
|
||
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 [1].
[1] https://github.com/Kimundi/owning-ref-rs/pull/15
Reporter | ||
Updated•8 years ago
|
Assignee: nobody → simon.sapin
Priority: -- → P1
Assignee | ||
Comment 4•8 years ago
|
||
I think https://github.com/servo/servo/pull/16014 fixed this.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•