Bug 1416073 - Avoid calling the expensive ComputeScrollMetadata function if we already computed that metadata before.
59 bytes, text/x-review-board-request
It seems like we do this work once per moving rectangle. Perhaps we can just do it once?
I assume this is happening because of the call site at  rather than from ScrollingLayersHelper. Should be easy to fix with a temp cache.  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.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=78d60b7a3f309c510aba7167c847e24d76d573db might be better. Will check in the morning.
status-firefox57: --- → unaffected
status-firefox58: --- → unaffected
Priority: -- → P2
Status: NEW → ASSIGNED
Priority: P2 → P1
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+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/dc46db3919a0 Avoid calling the expensive ComputeScrollMetadata function if we already computed that metadata before. r=jrmuizel
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.