Closed Bug 1422868 Opened 7 years ago Closed 6 years ago

Improve performance of nsDisplayCompositorHitTestInfo::CreateWebRenderCommands

Categories

(Core :: Graphics: WebRender, defect, P3)

Other Branch
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: kats, Unassigned)

References

()

Details

(Whiteboard: [wr-reserve] [gfx-noted])

With gfx.webrender.hit-test enabled, the compositor hit-test info display item is showing up pretty high in profiles. This one is from https://jrmuizel.github.io/webrender/facebook-refresh.html

https://perfht.ml/2iNZqJp
Whiteboard: [gfx-noted][wr-reserve][triage] → [wr-reserve] [gfx-noted]
It looks like most of the time (71%) is coming from nsDisplayListBuilder::FindReferenceFrameFor
If we move the call to FindReferenceFrameFor into the nsDisplayCompositorHitTestInfo constructor we'll probably get much better performance, since FindReferenceFrameFor has a built-in one-level cache which we'll take advantage of.
I'm going to close this since I don't think there's much more we can do in terms of optimizing the body of this function. However we can certainly create less of these display items and I'll file other bugs for that. Marking this fixed via dependencies.
Status: NEW → RESOLVED
Closed: 6 years ago
Depends on: 1424637
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.