Open Bug 1510100 Opened 6 years ago Updated 2 years ago

Improve nsIPresShell::DirtyRootsList storage and algorithms

Categories

(Core :: Layout, enhancement, P3)

enhancement

Tracking

()

Tracking Status
firefox65 --- affected

People

(Reporter: mozbugz, Unassigned)

References

Details

nsIPresShell::DirtyRootsList (introduced in bug 1159042) uses an nsTArray to sort dirty root frames and their depth. The array is sorted by increasing depths, so that we can pop the last element when we want to start reflow from a shallow root. This prevent reflowing a deeper root first, and then it being reflowed again when one of its ancestor root gets reflowed as well. This sorted nsTArray trick is okay, but could be improved by using a priority queue (aka binary heap over an array/vector). nsTPriorityQueue should work, though it makes some other operations a bit harder (e.g., Contains()), but it should be worth switching to it.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.