Closed
Bug 1338891
Opened 7 years ago
Closed 7 years ago
Scroll event listener added for telemetry slows down refresh driver
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
mozilla54
People
(Reporter: smaug, Assigned: rhunt)
References
Details
Attachments
(2 files, 1 obsolete file)
4.49 KB,
patch
|
smaug
:
review+
jcristau
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
4.32 KB,
patch
|
jcristau
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
I was very surprised to see in performance profiles that chrome JS runs whenever scrolling happens. Telemetry probes should be implemented in such way that they affect to performance as little as possible. So, if we need the probe, implement it in C++ please.
Comment 1•7 years ago
|
||
Is this triggering accumulations on each scroll? While moving this to C++ will help, you could also consider just accumulating the scrolls locally and Accumulate()ing the result in Telemetry only at the end of the lifetime of the document/frame/...
Assignee | ||
Comment 2•7 years ago
|
||
I'm trying to remember why we didn't Accumulate() at the end of a document/frame, but I can't think of any reason why. That should change. And yes, if this is going to stay for a while I agree it should be faster/in C++. Not accumulating during a scroll could be a good first step.
Assignee | ||
Comment 3•7 years ago
|
||
Rough patch that translates the javascript probe into an equivalent c++ one. I don't think it should live in dom/ipc, but I don't know where would be better.
Assignee: nobody → rhunt
Attachment #8836963 -
Flags: review?(bugs)
Assignee | ||
Comment 4•7 years ago
|
||
Do you have numbers of how much overhead this probe is adding to a scroll? It would be good to know that for figuring out how important it is to uplift to beta/aurora where the probe is now.
Flags: needinfo?(bugs)
Reporter | ||
Comment 5•7 years ago
|
||
Looks like in the worst case scenario (scrolling super simple document like data:text/html,<body style="height: 250000px"> ) overhead is 11% of the refreshdriver tick time. When scrolling some taskcluster log for example (plain text only in the page) overhead in refresh driver tick is ~6% More complicated pages make ProcessPendingUpdates take way more time and there the overhead is small.
Flags: needinfo?(bugs)
Reporter | ||
Comment 6•7 years ago
|
||
Comment on attachment 8836963 [details] [diff] [review] scroll.patch I was profiling this and noticed that GetScrollYOuter is accessed. (Somehow I missed that in the js probe profile.) Getting y flushes layout. That is really no-go for a telemetry probe. It may in worst case take, well, hundreds of milliseconds. Can we possibly move scroll telemetry to ::FireScrollEvent? Also, because of the layout flush, I think the js probe should be removed from branch(es?), since in some particularly way designed web pages flushing might affect ux really badly. Sorry that this is rather tricky. (but I suggest using a profiling when adding a probe)
Attachment #8836963 -
Flags: review?(bugs) → review-
Comment 7•7 years ago
|
||
[Tracking Requested - why for this release]: Requesting tracking because this work is to fix a Telemetry probe that might inadvertently slow down or jank the browser when scrolling.
status-firefox52:
--- → affected
status-firefox53:
--- → affected
tracking-firefox52:
--- → ?
tracking-firefox53:
--- → ?
Assignee | ||
Comment 8•7 years ago
|
||
Backs out the scroll tracking probes from central, I'll upload other patches for beta/aurora and flag for approval.
Attachment #8836963 -
Attachment is obsolete: true
Attachment #8837843 -
Flags: review?(bugs)
Assignee | ||
Comment 9•7 years ago
|
||
Comment on attachment 8837843 [details] [diff] [review] scroll-backout-central.patch Approval Request Comment [Feature/Bug causing the regression]: telemetry scroll probes (bugs 1297867 + 1312881) [User impact if declined]: scrolling can be slower or janky because of induced layout [Is this code covered by automated tests?]: no [Has the fix been verified in Nightly?]: no [Needs manual test from QE? If yes, steps to reproduce]: no [List of other uplifts needed for the feature/fix]: none [Is the change risky?]: no [Why is the change risky/not risky?]: it removes a script that nothing depends on, that causes issues [String changes made/needed]: none
Attachment #8837843 -
Flags: approval-mozilla-aurora?
Assignee | ||
Comment 10•7 years ago
|
||
Rebased the patch above for Beta, it's the same thing. Approval Request Comment [Feature/Bug causing the regression]: telemetry scroll probes (bugs 1297867 + 1312881) [User impact if declined]: scrolling can be slower or janky because of induced layout [Is this code covered by automated tests?]: no [Has the fix been verified in Nightly?]: no [Needs manual test from QE? If yes, steps to reproduce]: no [List of other uplifts needed for the feature/fix]: none [Is the change risky?]: no [Why is the change risky/not risky?]: it removes a script that nothing depends on, that causes issues [String changes made/needed]: none
Attachment #8837845 -
Flags: approval-mozilla-beta?
Reporter | ||
Updated•7 years ago
|
Attachment #8837843 -
Flags: review?(bugs) → review+
Comment 11•7 years ago
|
||
Pushed by rhunt@eqrion.net: https://hg.mozilla.org/integration/mozilla-inbound/rev/3873032b697b Backout telemetry scroll tracking r=smaug
Comment 12•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/3873032b697b
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox54:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
Comment 13•7 years ago
|
||
Comment on attachment 8837845 [details] [diff] [review] scroll-backout-beta.patch back out telemetry probes that slow down scrolling, beta52+
Attachment #8837845 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment 14•7 years ago
|
||
Comment on attachment 8837843 [details] [diff] [review] scroll-backout-central.patch backout telemetry probes that slow down scrolling, aurora53+
Attachment #8837843 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Updated•7 years ago
|
Comment 15•7 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-beta/rev/24e3db5779ee
Comment 16•7 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-aurora/rev/cd49d673aad3
Comment 17•7 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-esr52/rev/24e3db5779ee
status-firefox-esr52:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•