stylo: We allocate too much during the cascade

Assigned to



CSS Parsing and Computation
3 months ago
2 months ago


(Reporter: bholley, Assigned: bholley)


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

Firefox Tracking Flags

(Not tracked)


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 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.