Closed Bug 1804772 Opened 1 year ago Closed 1 year ago

nsIFrame::GetStartPageValue/nsIFrame::GetEndPageValue are slow with very large page counts with CSS named pages enabled

Categories

(Core :: CSS Parsing and Computation, defect, P2)

defect

Tracking

()

RESOLVED FIXED
109 Branch
Tracking Status
firefox109 --- fixed

People

(Reporter: alaskanemily, Assigned: alaskanemily)

References

Details

Attachments

(1 file)

This is the same underlying problem as Bug 1803861. We can fix this by copying over the PageValuesProperty frame property when creating continuations.

We might want to investigate sharing a single PageValues struct for all continuations, or ref-counting the struct and possibly also sharing it for entire subtrees as a followup.

This was causing layout/generic/crashtests/1683126.html to timeout with named
pages enabled.

It is possible for a frame's PageValues struct to have both the start and end
values be set to null as further children are added. In that case, we can
avoid doing an extra allocation for each of that frame's continuations, as a
small optimization.

Assignee: nobody → emcdonough
Status: NEW → ASSIGNED
Pushed by emcdonough@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4af3a83487c7
Make nsIFrame::GetStartPageValue/nsIFrame::GetEndPageValue constant complexity by copying over the PageValuesProperty value when creating frame continuations. r=dholbert
Pushed by emcdonough@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b2fdd07b21f5
Make nsIFrame::GetStartPageValue/nsIFrame::GetEndPageValue constant complexity by copying over the PageValuesProperty value when creating frame continuations. r=dholbert
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 109 Branch
Flags: needinfo?(emcdonough)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: