Closed Bug 1426277 Opened 4 years ago Closed 3 years ago
Display Layer Event Regions performance
With retained display lists, the event regions items tracks a list of rectangles, along with the frame that contributed it. It seems that we frequently get a large rectangle contributed by a parent frame, and then smaller rectangles (entirely contained with the larger rectangle) contributed by a descendant. These extra rectangles don't add anything to the final region, nor can we change the outer rect without recomputing children (any modification to a frame triggers display list building for itself and all descendants), so it seems like we don't really need the smaller rectangles. This long list of rectangles adds time to display list building, merging, cleanup etc. It would be nice if we could quickly determine that a given frame had the same event type, and was a subset of an ancestor, and then skip adding the frame to the event regions..
Agree! We can in fact now quickly determine if frames have the same event type, by comparing their GetCompositorHitTestInfo() values. In terms of checking a subset of the ancestor, maybe we can put a stack on the nsDisplayListBuilder so that when we recurse into a subframe, we can quickly compare it's hit-test info, ASR, and rect against the parent frame? If the hit-test info and ASR matches, and the rect is a contained inside, then we can skip it. I think that should cover a lot (but probably not all) of the cases.
4 years ago
See Also: → 1425863
This was implemented in bug 1434243.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1434243
You need to log in before you can comment on or make changes to this bug.