Bug: FF91 and newer produce *huge* CPU-Load in certain situations
Status: VERIFIED
Priority: --
Resolution: INCOMPLETE
Created: 2022-02-01 16:32:42+00:00
Resolved: 2022-03-25 12:29:59+00:00

Steps to reproduce:

Systems: Debian 11, Mint 19.3, Windows7/Server2k8R2
FF-Versions: FF91 and newer

After updating from FF78LTS (where the bug did not appear that noticable) to FF91LTS unknown circumstances frequently appear leading to FF producing *huge* CPU load, although the websites have no visible animation or any other tasks to do. Reloading the website temporary fixes the bug - but only until the unknown circumstances reappear some minutes later.

This happens with different websites - all being long-time-interacted rich internet applications. So a bug in a website itself can be ruled out.

Steps to reproduce:
1. login to https://demo.sogo.nu/SOGo/ using username "sogo1" and pw "sogo1"
2. make sure, the list of emails displayed in "inbox" is longer than the box is  - so a scrollbar is displayed (if not, create some emails by copying them to/from "drafts" and back to "inbox")
3. select first mail in inbox
4. press the down key
5. see the cpu going crazy

On computers with weak/old CPUs the impact was more noticable than on such with modern CPUs.

Accessing the erroneous firefox instance by a RDP connection also shows a huge traffic being transferred although there is no motion/animation. So unnecessary redraws of the whole FF window must be the case.

As far as I can tell from the debug console the problem seems to be related to high frequently calls of "requestAnimationFrame". Setting "gfx.webrender.force-disabled" to "true" seems to lower the CPU consumption.

I was able to reproduce the problem on different machines, settings and also with newer Versions of FF (tested up to FF95.0.1):

Test 1 - problem confirmed:
=========================
johndoe@machine1:~$ dpkg -l | grep firefox
ii  firefox 95.0.1+linuxmint1.1+tricia                      amd64  Safe 
and easy web browser from Mozilla
ii  firefox-locale-de 95.0.1+linuxmint1.1+tricia amd64        German 
language pack for Firefox

johndoe@machine1:~$ uname -a
Linux machine 5.4.0-91-generic #102~18.04.1-Ubuntu SMP Thu Nov 11 
14:46:36 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

johndoe@machine1:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	LinuxMint
Description:	Linux Mint 19.3 Tricia
Release:	19.3
Codename:	tricia

johndoe@machine1:~$ lscpu
CPU(s):                        2
Modellname:                    Intel(R) Core(TM)2 CPU          6600  @ 
2.40GHz
Stepping:                      6
CPU MHz:                       2082.280
Maximale Taktfrequenz der CPU: 2394,0000
Minimale Taktfrequenz der CPU: 1596,0000
BogoMIPS:                      4799.65

Test 2 - problem slightly visible in ff78esr, but not as extreme as in ff95esr:
===================================================================
johndoe@machine2:~$ dpkg -l | grep firefox
ii  firefox-esr                            78.15.0esr-1~deb10u1   amd64 
        Mozilla Firefox web browser - Extended Support Release (ESR)
ii  firefox-esr-l10n-de                    78.15.0esr-1~deb10u1   all 
        German language package for Firefox ESR

johndoe@machine2:~$ uname -a
Linux machine 4.19.0-18-amd64 #1 SMP Debian 4.19.208-1 (2021-09-29) 
x86_64 GNU/Linux

johndoe@machine2:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 10 (buster)
Release:        10
Codename:       buster

johndoe@machine2:~$ lscpu
CPU(s):                        2
Modellname:                    Intel(R) Pentium(R) CPU        P6100  @ 
2.00GHz
Stepping:                      5
CPU MHz:                       931.269
Maximale Taktfrequenz der CPU: 1999,0000
Minimale Taktfrequenz der CPU: 933,0000
BogoMIPS:                      3990.36

Test 3 - problem confirmed:
=========================

johndoe@machine3:~$ dpkg -l | grep firefox
ii  firefox 95.0.1+linuxmint1.1+tricia                      amd64 
  Safe and easy web browser from Mozilla
ii  firefox-locale-de 95.0.1+linuxmint1.1+tricia 
amd64        German language pack for Firefox

johndoe@machine3:~$ uname -a
Linux machine 5.6.6-050606-generic #202004210831 SMP Tue Apr 21 08:33:23 
UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

johndoe@machine3:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	LinuxMint
Description:	Linux Mint 19.3 Tricia
Release:	19.3
Codename:	tricia

johndoe@machine3:~$ lscpu
CPU(s):                        12
Modellname:                    AMD Ryzen 5 3600 6-Core Processor
Stepping:                      0
CPU MHz:                       2198.910
Maximale Taktfrequenz der CPU: 3600,0000
Minimale Taktfrequenz der CPU: 2200,0000
BogoMIPS:                      7199.25


Actual results:

Firefox produces unexpectedly huge and permanent CPU-Load where no siginificant load is expected.


Expected results:

FF should only consume minimal ressources.