Extremely poor scrolling performance with scroll anchoring enabled on large buildbot logs
Categories
(Core :: Layout, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr60 | --- | unaffected |
firefox65 | --- | unaffected |
firefox66 | --- | verified |
firefox67 | --- | verified |
People
(Reporter: jdm, Assigned: rhunt)
References
()
Details
(Keywords: regression)
Attachments
(2 files)
47 bytes,
text/x-phabricator-request
|
lizzard
:
approval-mozilla-beta+
|
Details | Review |
47 bytes,
text/x-phabricator-request
|
lizzard
:
approval-mozilla-beta+
|
Details | Review |
With layout.css.scroll-anchoring.enabled, the performance of scrolling to the bottom of the page and then using the arrow keys to scroll upwards is impressively bad. With the preference disabled, it is very smooth.
Looks like something like 90% of time is being spent under window.onscroll, which ends up flushing layout and doing a lot of scroll anchor work.
Updated•6 years ago
|
Assignee | ||
Comment 1•6 years ago
|
||
Ouch. It's probably not great we're flushing layout in a scroll event, but we shouldn't be taking that long to do anchor selection. I'll see how we can optimize it.
It looks like getting transforms from frames is taking ~23% of the time.
Updated•6 years ago
|
Assignee | ||
Comment 2•6 years ago
|
||
I've begun looking at optimizing SelectAnchor
. There's some good room for improvement, but some if it will take some careful thought.
I'm putting up two patches that help the performance on this test case quite a bit.
Assignee | ||
Comment 3•6 years ago
|
||
A continuation text frame's rect will be considered when visiting the primary
frame via 'FindScrollAnchoringBoundingRect', so we have no reason to compute
the same rect again if for some reason we have excluded the primary text frame.
Assignee | ||
Comment 4•6 years ago
|
||
When visiting a text frame with many continuations, traversing ancestors to compute the
transform to the ancestor scroll frame can become very hot. This commit changes the
algorithm to translate all the text continuations to an ancestor that can then be
transformed just once.
Depends on D17729
Comment 6•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/39b844d85e7a
https://hg.mozilla.org/mozilla-central/rev/e1865f9630af
Comment 7•6 years ago
|
||
Flagging for QA verification. I guess we'll want this on 66 since scroll anchoring is riding that train?
Comment 8•6 years ago
|
||
Hi Josh,
I wanted to verify this issue, but didn't have access to a large buildbot log. The one in the Url attached: https://build.servo.org/builders/linux-rel-wpt/builds/11555/steps/test__1/logs/stdio doesn't seem to be available anymore.
Can you help me out please?
Reporter | ||
Comment 9•6 years ago
|
||
Updated•6 years ago
|
Comment 10•6 years ago
|
||
Thank you for the log!
Unfortunately I couldn't reproduce the issue on older builds, I've tried on several older Nightly builds (build ID: 20190120094340 and on 20190119095933) on several OS's (Win 10x64, Win7 x32 and x64, Ubuntu 16.04 x32 and macOS ) but I could not notice any difference from the latest Nightly (20190204214259) nor something "impressively bad" while using the arrow keys to scroll upwards.
I've also checked with layout.css.scroll-anchoring.enabled set both to true and false, but couldn't see any change.
Is there something I'm missing or am I doing something wrong?
Updated•6 years ago
|
Reporter | ||
Comment 11•6 years ago
|
||
https://build.servo.org/builders/mac-rel-css1/builds/6527/steps/test/logs/test-wpt.log/text may work, in that case. Warning, 100mb+ log file.
Comment 12•6 years ago
|
||
Hi,
I've tried again with the latest log provided in comment 11, compared between Nightly 66.0a1 20190119215456 and Nightly 67.0a1 20190207094841 on Win 10 x64 but still can't see any performance differences between the two builds while scrolling up with the up arrow key.
So in my view I couldn't verify a problem that doesn't seem to reproduce in any of the builds (old vs. new).
Josh could you please advise if the issue can be marked as verified on Nightly 67.0a1?
Reporter | ||
Comment 13•6 years ago
|
||
Yes, I don't think it's worth trying to keep chasing it on the old builds.
Comment 14•6 years ago
|
||
Based on comment 13 I'm marking this as verified.
Thank you Josh!
Updated•6 years ago
|
Hi Ryan, since 66 is set to affected, should we consider uplifting this to Beta66? Thanks!
Assignee | ||
Comment 16•6 years ago
|
||
Comment on attachment 9039301 [details]
Bug 1521579 - Only transform one bounding rect for text nodes when computing scroll anchoring bounding rect. r?dholbert
Beta/Release Uplift Approval Request
Feature/Bug causing the regression
Scroll Anchoring
User impact if declined
User will have poor scrolling performance on some text heavy pages.
Is this code covered by automated tests?
No
Has the fix been verified in Nightly?
Yes
Needs manual test from QE?
No
If yes, steps to reproduce
List of other uplifts needed
None
Risk to taking this patch
Low
Why is the change risky/not risky? (and alternatives if risky)
It's been cooking nightly for a while with no apparent crash or correctness regressions.
String changes made/needed
Assignee | ||
Comment 17•6 years ago
|
||
Comment on attachment 9039300 [details]
Bug 1521579 - Skip text frames that are continuations. r?dholbert
Beta/Release Uplift Approval Request
Feature/Bug causing the regression
Scroll Anchoring
User impact if declined
User will have poor scrolling performance on some text heavy pages.
Is this code covered by automated tests?
No
Has the fix been verified in Nightly?
Yes
Needs manual test from QE?
No
If yes, steps to reproduce
List of other uplifts needed
None
Risk to taking this patch
Low
Why is the change risky/not risky? (and alternatives if risky)
It's been cooking nightly for a while with no apparent crash or correctness regressions.
String changes made/needed
Comment 18•6 years ago
|
||
Comment on attachment 9039300 [details]
Bug 1521579 - Skip text frames that are continuations. r?dholbert
Perf fix for behavior with scroll anchoring enabled, verified in nightly.
OK to uplift for beta 8.
Updated•6 years ago
|
Comment 19•6 years ago
|
||
bugherder uplift |
Updated•6 years ago
|
Comment 20•6 years ago
•
|
||
I've checked again by comparing Beta 66.0b8 20190214195736 to Nightly 67.0a1 20190215095516 on Win 10 x64 and the results are the same as before (see Comment 12 and Comment 13). I've used the following log as the ones provided above are not available anymore https://build.servo.org/builders/mac-rel-wpt2/builds/10842/steps/test/logs/test-wpt.log
Marking as verified.
Updated•6 years ago
|
Description
•