Rendering long pages with text selection takes seconds
Categories
(Core :: Web Painting, defect, P2)
Tracking
()
People
(Reporter: paulkek, Assigned: mikokm)
References
(Regression)
Details
(Keywords: perf, regression, reproducible)
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36
Steps to reproduce:
Hardware:
- i7-6700k (4/8 cores with Intel HD Graphics 530)
- 32GB DDR4 RAM
- Linux 5.9.11-arch2-1
- Xorg / GNOME 3.38
- Mesa 20.2.3-1
- Firefox Nigthly 85.0a1 (2020-11-28) (64-bit) with no extensions
layers.acceleration.force-enabled: true
Tested with both WebRender enabled and disabled.
Reproduction:
- Go to https://elixir.bootlin.com/linux/v5.8.11/source/kernel/sched/fair.c
- Scroll to mid page and select some code (and keep is selected)
- Scroll up quickly by dragging the scroll-bar upwards
Actual results:
The page takes a while to actually show the page (~2 seconds).
Expected results:
Without text selection, the page renders promptly so should it with text selection.
Comment 1•4 years ago
|
||
Setting a component for this enhancement in order to get the dev team involved.
If you feel it's an incorrect one please feel free to change it to a more appropriate one.
Comment 2•4 years ago
|
||
Can you use gecko profiler (https://profiler.firefox.com/) to find the weak spot?
Thanks.
Comment 3•4 years ago
|
||
I can reproduce the issue on Nightly85.0a1 Windows10 if some code is selected.
Without text selection: https://share.firefox.dev/2Ig4uCO
With text selection: https://share.firefox.dev/36Ld5H1
Comment 4•4 years ago
|
||
Regression window:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=ab8293506be28247f76acb9e9da78a20e6ffad0f&tochange=399464979f2159ebd9108da3a28a09540948a021
Updated•4 years ago
|
Ping. I can still reproduce this issue with the latest nightly.
Assignee | ||
Comment 7•4 years ago
|
||
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 8•4 years ago
|
||
This patch does not fix the root cause of the issue, which is described in bug 1503581.
What this patch does fix, is that we now reuse the results of the expensive computation at least until the text frame is reflowed, or if the selection changes.
Assignee | ||
Updated•4 years ago
|
Comment 9•4 years ago
|
||
Hi,
As per comment 4 I will update "has regression range" field accordingly.
Best,
Clara
Updated•4 years ago
|
Updated•4 years ago
|
Comment 10•4 years ago
|
||
Comment 11•4 years ago
|
||
Backed out for causing multiple failures.
Backout link: https://hg.mozilla.org/integration/autoland/rev/f40f0ac8c4e83eef889430799aa8f699f6c0dfed
Failure log: https://treeherder.mozilla.org/logviewer?job_id=334191340&repo=autoland&lineNumber=11212
https://treeherder.mozilla.org/logviewer?job_id=334190337&repo=autoland&lineNumber=22557
https://treeherder.mozilla.org/logviewer?job_id=334188611&repo=autoland&lineNumber=38148
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Comment 12•4 years ago
|
||
Comment 13•4 years ago
|
||
bugherder |
Updated•4 years ago
|
Updated•4 years ago
|
Comment 14•4 years ago
|
||
I was able to reproduce this issue on Firefox 85.0a1 (2020-11-28) on macOS 10.15.7.
Tried verifying it on Firefox 89.0b9 and Firefox 90.0a1 but it seems to be still reproducing (see attachment). Is there something that can be done?
Assignee | ||
Comment 15•4 years ago
|
||
(In reply to Catalin Sasca, QA [:csasca] from comment #14)
I was able to reproduce this issue on Firefox 85.0a1 (2020-11-28) on macOS 10.15.7.
Tried verifying it on Firefox 89.0b9 and Firefox 90.0a1 but it seems to be still reproducing (see attachment). Is there something that can be done?
I think what you are observing is correct. As mentioned in the comment 8, this patch only mitigates the problem. The root cause of this issue is tracked in bug 1503581.
Do you see any improvement with newer Firefox? The content should reappear much quicker now after scrolling.
On this page, we call the slow nsTextFrame::IsFrameSelected()
function almost ten thousands times per page scrolled (and multiple times per frame). Based on casual testing, this patch caches around 90-95% of those calls.
Comment 16•4 years ago
|
||
Yes, the performance is a bit better (~1 second) to display the text. Reverified on Firefox 89.0b10 and 90.0a1 (2021-05-09) under macOS 10.15.7, Ubuntu 20.04 and Windows 10.
Description
•