19% of WebRenderLayerManager::EndTransaction during MotionMark is in nsHTMLScrollFrame::ComputeScrollMetaData

RESOLVED FIXED in Firefox 59

Status

()

P1
normal
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: jrmuizel, Assigned: kats)

Tracking

(Blocks: 2 bugs)

unspecified
mozilla59
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox57 unaffected, firefox58 unaffected, firefox59 fixed)

Details

(Whiteboard: [wr-mvp])

Attachments

(1 attachment)

(Reporter)

Description

a year ago
It seems like we do this work once per moving rectangle. Perhaps we can just do it once?
(Reporter)

Updated

a year ago
Blocks: 1416082
I assume this is happening because of the call site at [1] rather than from ScrollingLayersHelper. Should be easy to fix with a temp cache.

[1] https://searchfox.org/mozilla-central/rev/30ead7d1ae5bf95b8bc0fd67b950cd46ca05e32c/gfx/layers/wr/WebRenderScrollData.cpp#88
I wrote a patch. Uncompiled locally but here's a try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=ba76bc23debcf282e9ede8aa0415eab0cef0a7bb

This should reduce it significantly. If the ViewIDForASR call still shows up a significant cost in the profile (a la bug 1412112) I can add an std::unordered_map<ActiveScrolledRoot*,FrameMetrics::ViewID> somewhere to speed it up, and reuse that cache across both WebRenderScrollData stuff and ScrollingLayerHelper per-transaction. I can do it in bug 1412112 if you think it'll help.
Comment hidden (mozreview-request)
Assignee: nobody → bugmail
Blocks: 1386665
status-firefox57: --- → unaffected
status-firefox58: --- → unaffected
Priority: -- → P2
Status: NEW → ASSIGNED
Priority: P2 → P1
Whiteboard: [wr-mvp]
(Reporter)

Comment 5

a year ago
mozreview-review
Comment on attachment 8927289 [details]
Bug 1416073 - Avoid calling the expensive ComputeScrollMetadata function if we already computed that metadata before.

https://reviewboard.mozilla.org/r/198604/#review204356
Attachment #8927289 - Flags: review?(jmuizelaar) → review+

Comment 6

a year ago
Pushed by kgupta@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/dc46db3919a0
Avoid calling the expensive ComputeScrollMetadata function if we already computed that metadata before. r=jrmuizel

Comment 7

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/dc46db3919a0
Status: ASSIGNED → RESOLVED
Last Resolved: a year ago
status-firefox59: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in before you can comment on or make changes to this bug.