Open Bug 1768112 Opened 2 years ago Updated 2 years ago

firefox takes 80% CPU time due to invisible "100 Thank-Yous"

Categories

(Core :: Graphics: WebRender, defect, P3)

Firefox 100
Desktop
Linux
defect

Tracking

()

UNCONFIRMED
Performance Impact low

People

(Reporter: vincent-moz, Unassigned)

References

(Blocks 2 open bugs)

Details

(Keywords: perf:resource-use)

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

Steps to reproduce:

Run firefox after the upgrade to Firefox 100.

Actual results:

/usr/local/firefox/firefox takes 80% CPU time (but the /usr/local/firefox/firefox-bin instances take very little CPU time).

Expected results:

/usr/local/firefox/firefox should take almost no CPU time.

Note: If I record a performance profile, I can see screenshots with a "100 Thank-Yous" box, but I do not see such a thing in Firefox. Well... I eventually found the window and the tab that contained this box, and I could discard it, which solved the CPU issue. But it's silly to display that in a tab that is not visible!!!

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

Can you attach the performance profile here?
Thanks.

Flags: needinfo?(vincent-moz)

The performance profile: https://share.firefox.dev/3kRHEAZ

Flags: needinfo?(vincent-moz)

Does this happen only at startup or any time it tries to show it? One can force it to show with

Cc["@mozilla.org/browser/browserglue;1"].getService().wrappedJSObject._showUpgradeDialog()
Blocks: 1728848

(In reply to Ed Lee :Mardak from comment #4)

Cc["@mozilla.org/browser/browserglue;1"].getService().wrappedJSObject._showUpgradeDialog()

If I type that in the browser console, I get: "Uncaught ReferenceError: Cc is not defined".

FYI, no issues with the about:welcome page.

Profile indicates it's struck in painting/rendering so moving there.

Component: Widget: Gtk → Graphics: WebRender

btw. Can you try to reproduce with disabled HW rendering? How-to is here:
https://fedoraproject.org/wiki/How_to_debug_Firefox_problems#Check_WebRender_state_.28Hardware_acceleration.29
Thanks.

Flags: needinfo?(vincent-moz)

If I go to the about:support page, I can see: "Compositing: WebRender (Software)". So it appears that I don't have HW rendering.

https://fedoraproject.org/wiki/How_to_debug_Firefox_problems#Check_WebRender_state_.28Hardware_acceleration.29 says "WebRender is Firefox hardware accelerated back end which uses OpenGL. It's enabled by default on Gnome/X.org and Gnome/Wayland for Intel/AMD graphics cards." But I do not use GNOME (or any other desktop environment) and my graphic card is an NVIDIA one.

The about:support page also says about WebRender:

WEBRENDER:
available by default
disabled by env: Not qualified
WEBRENDER_QUALIFIED:
available by default
blocklisted by env: No qualified hardware
WEBRENDER_COMPOSITOR:
disabled by default: Disabled by default
blocklisted by env: Blocklisted by gfxInfo
WEBRENDER_PARTIAL:
available by default
blocklisted by env: Blocklisted by gfxInfo
WEBRENDER_SHADER_CACHE:
disabled by default: Disabled by default
unavailable by runtime: WebRender disabled
WEBRENDER_OPTIMIZED_SHADERS:
available by default
unavailable by runtime: WebRender disabled
WEBRENDER_ANGLE:
available by default
unavailable by env: OS not supported
WEBRENDER_DCOMP_PRESENT:
available by default
disabled by user: User disabled via pref
unavailable by env: Requires Windows 10 or later
unavailable by runtime: Requires ANGLE
WEBRENDER_SOFTWARE:
available by default

Flags: needinfo?(vincent-moz)

Can you attach the info included under "GPU #1" (vendor ID, device ID, driver version, description)?

The profile seems including as the Renderer thread samples don't go below UpdateAndRender. Can you try to collect it again using the "Graphics" settings from the profiler? Thanks!

Flags: needinfo?(vincent-moz)

Also you can try forcing hardware WebRender by setting gfx.webrender.all to true in about:config

(In reply to Andrew Osmond [:aosmond] (he/him) from comment #9)

Can you attach the info included under "GPU #1" (vendor ID, device ID, driver version, description)?

GPU #1
Active          Yes
Description     Quadro K610M/PCIe/SSE2
Vendor ID       0x10de
Device ID       0x12b9
Driver Vendor   nvidia/unknown
Driver Version  390.147.0.0
RAM             0

The profile seems including as the Renderer thread samples don't go below UpdateAndRender. Can you try to collect it again using the "Graphics" settings from the profiler? Thanks!

https://share.firefox.dev/3sxac7m

Flags: needinfo?(vincent-moz)

(In reply to Andrew Osmond [:aosmond] (he/him) from comment #10)

Also you can try forcing hardware WebRender by setting gfx.webrender.all to true in about:config

This is much worse: it takes 600% CPU time. Here's the profile:

https://share.firefox.dev/38u2XGh

Performance Impact: --- → P3
Blocks: wr-perf
Severity: -- → S3
OS: Unspecified → Linux
Priority: -- → P3
Hardware: Unspecified → Desktop
You need to log in before you can comment on or make changes to this bug.