Open Bug 1557933 Opened 5 years ago Updated 2 years ago

High CPU usage when scrolling and drawing (Nightly 69.0, Linux, Xwayland/Wayland, incl. profile)

Categories

(Core :: Graphics, defect, P3)

69 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: hello, Unassigned)

Details

Attachments

(2 files)

Attached file aboutsupport.txt

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0

Steps to reproduce:

Screen recording here:
https://drive.google.com/file/d/1SLJS3I6bcIvJr9kXl8E5_E4IT_OyAEzp/view?usp=sharing

Gecko Profiler profile here:
https://profiler.firefox.com/public/2ffbfb4a3350263c625ac685e23b204fb334849c/calltree/?globalTrackOrder=0-1-2-3-4&localTrackOrderByPid=5545-0~5643-0-1-2-3-4-5-6~&published&thread=0&v=3

Environment:

  • Firefox Nightly (69.0a1, 2019-06-07-22-01-56-mozilla-central)
  • Guix 1.0.1 (a linux-libre distro)
  • Wayland with Sway, Firefox using Xwayland
  • Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz
  • Mesa DRI Intel(R) HD Graphics 620 (Kaby Lake GT2)
  • See attached aboutsupport.txt for more details.

Steps to reproduce:

  1. Launch a brand-new profile
  2. Open any lengthy page, such as about:support
  3. Scroll back and forth using a laptop touchpad

Some additional notes:

  • 67.0 stable has the same behaviour.
  • Screen recording takes a lot of resources which is why total CPU usage is high in the video, but Firefox's share is about the same as without screen recording. The profiler adds maybe 20% overhead.
  • Enabling Wayland support using GDK_BACKEND=wayland doesn't help, performance seems somewhat worse.
  • Disabling WebRender makes performance a lot worse, scrolling hits about 10-20 fps, which is probably expected.
  • I don't see much difference if I toggle the various layers.* flags.

Actual results:

CPU usage spikes during scrolling, to the point my laptop's fans engage whenever scrolling, and it goes down when I stop. This also happens when resizing the browser and doing other things that cause the browser to draw a lot. I don't see high CPU usage like this when drawing in any other application.

Expected results:

I don't think CPU usage should be this high :(

Component: Untriaged → Graphics
Product: Firefox → Core
Priority: -- → P3
Attached file aboutsupport.txt

Also experiencing the above issue:
Scrolling ramps up cpu usage to 60-85% usage across all four cpu cores.

Environment:

  • FF Nightly 70a1
  • Arch Linux
  • Intel i5-7300HQ
  • Intel HD 630 Kaby Lake

Gecko profiler profile:
https://perfht.ml/2JxjIB9

Notes:

  • Occurs on Stable 68 as well. Has been occurring for some time before that, however.
  • Occurs on a fresh profile
  • Doesn't seem to be related to page content (occurs while scrolling through a simple .txt file, not just complex webpages)
  • Does not occur in other browsers
  • Doesn't have to be fast scrolling, barely scrolling is enough to trigger it
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: