Open Bug 1793310 Opened 2 months ago Updated 2 months ago

much CPU time on pages with a visible video while not being played

Categories

(Core :: Audio/Video: Playback, defect)

Firefox 105
defect

Tracking

()

UNCONFIRMED

People

(Reporter: vincent-moz, Unassigned)

Details

(Keywords: perf:resource-use)

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

Steps to reproduce:

Open https://www.allocine.fr/video/player_gen_cmedia=19597373&cfilm=290439.html (other web sites with a video show a similar behavior, but for instance, YouTube doesn't).

Actual results:

The page is opened as expected, but while this tab is visible, it takes much CPU time (while the video doesn't play, so the video itself cannot be blamed for that): about 90% for Firefox and 100% for Xorg. There seems to be no changing elements that could explain this behavior.

Profile captured with the Firefox profiler: https://share.firefox.dev/3BZPwc6

This issue has occurred for several weeks, I think.

Expected results:

The CPU time should remain at around 0 - 1%.

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

Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core

The profile shows around 40% CPU use in each of the Render and SwComposite threads.

I haven't been able to reproduce. https://www.allocine.fr/video/player_gen_cmedia=19597373&cfilm=290439.html starts playing the trailer silently after showing an advert video (after accepting cookies).
I can pause either the ad or the trailer, or wait until the end of the trailer, and CPU usage drops to 10% or less. Chrome behavior is similar.

Can you link to another site that demonstrates for you, please?

Flags: needinfo?(vincent-moz)

I block autoplay, so the video doesn't start playing. I suggest that you do that.

Same issue on https://actu.fr/occitanie/toulouse_31555/a-toulouse-on-va-developper-engin-revolutionnaire-voyager-1-200-kmh_3808725.html after scrolling down (where the video is).

Flags: needinfo?(vincent-moz)

I can reproduce sometimes a significant increase in CPU usage while the video is visible on https://actu.fr/occitanie/toulouse_31555/a-toulouse-on-va-developper-engin-revolutionnaire-voyager-1-200-kmh_3808725.html

I've seen this both with video autoplay blocked (Settings -> Privacy and Security -> Permissions -> Autoplay -> Settings... -> Block Audio and Video) and with video autoplay not blocked, but the video paused.

Reproduction is somewhat unreliable due to other content on the page.
Sometimes the video is shown in the bottom right corner of the viewport before scrolling, in which case cpu usage is high already.

Severity: -- → S3
Summary: much CPU time on pages with a video while not being played → much CPU time on pages with a visible video while not being played

Reproduces also in Firefox 95 (random older version).
CPU usage is much lower with Chrome.

You need to log in before you can comment on or make changes to this bug.