Closed Bug 1926512 Opened 10 months ago Closed 10 months ago

Consider caching first-continuation/first-in-flow directly in nsSplittableFrame

Categories

(Core :: Layout, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
133 Branch
Tracking Status
firefox133 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Bug 1865012 introduced first-in-flow/first-continuation caching in nsSplittableFrame using frame properties. However, in the pathologically-slow reflow seen in bug 1925916, profiling shows that the frame property access itself (nsIFrame::SetProperty and RemoveProperty) is a significant cost. It might be worth instead caching these pointers directly in member variables of nsSplittableFrame.

Looking at the first profile in bug 1925916, the long reflow is 4m 21s, and within this, there are 46.5K samples in nsIFrame::SetProperty/RemoveProperty -- essentially all of which are managing these nsSplittableFrame properties. That overhead will basically disappear if we move them into the frame itself.

In my local (non-PGO) build on Windows, making these member variables instead reduces the overall time for the example in bug 1925916 from 5 minutes to a bit over 3 minutes. Still far too long, of course, but it's a significant reduction.

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/45ede4b715b4 Cache first-continuation/first-in-flow pointers directly in nsSplittableFrame. r=jwatt
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch
Regressions: 1928199
Blocks: layout-perf
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: