stylo: We allocate too much during the cascade

NEW
Assigned to

Status

()

Core
CSS Parsing and Computation
P1
normal
29 days ago
7 days ago

People

(Reporter: bholley, Assigned: bholley)

Tracking

(Depends on: 3 bugs, Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

In the profile in bug 1360878 comment 1, we spend 11ms in malloc/free, which is too much. There are a couple of sources for this, and I'll file dependent bugs.

Note that this is about sequential performance. In bug 1291355 Julian is investigating contention issues that (we think) makes malloc blow up when parallelized. So any malloc reduction here will dovetail with whatever we find out there.
Depends on: 1360882
Depends on: 1347852
Depends on: 1360776
We should also refcount inherited-by-default types.
Depends on: 1360910
I think before considering implementing our own Arc, we should fix the dumb stuff we do. I've opened https://github.com/servo/servo/pull/16664 to do that, which should make the comparison actually useful.
Depends on: 1361392
Bobby, how does bug 1361392 block this? That's text shaping code, so shouldn't affect styling, only layout.
Flags: needinfo?(bobbyholley)
Oh, I just saw that it was allocation-related and blocked bug 1360878. So I guess the real question is why it blocks bug 1360878...
Flags: needinfo?(bobbyholley) → needinfo?(jseward)
No longer depends on: 1361392
I was unclear whether this was part of styling or not; evidently not.
So the blocking of bug 1360878 is wrong, IIUC.
Flags: needinfo?(jseward)
Yeah, I suggested Julian to report the memory inefficiencies he found while investigating that test case blocking bug 1360878, and triage them later. My fault, should've removed that dependency. But the report was quite useful anyway :)
Priority: -- → P1
Depends on: 1356701, 1360772
You need to log in before you can comment on or make changes to this bug.