Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High CPU usage when playing media in a background tab on firefox #12045

Open
1 task done
rktjmp opened this issue Nov 19, 2024 · 2 comments
Open
1 task done

High CPU usage when playing media in a background tab on firefox #12045

rktjmp opened this issue Nov 19, 2024 · 2 comments
Labels
browser Browser Extension bug

Comments

@rktjmp
Copy link

rktjmp commented Nov 19, 2024

Steps To Reproduce

  1. Go to a website that plays audio or video, observed with at least mediaplayerelementjs (http://www.mediaelementjs.com/examples.html) and firesideplayer2 (podcast audio player). Not observed on youtube.com.
  2. Play media.
  3. Open new tab so media tab is not focused.
  4. Observe high CPU usage in about:processes.
  5. Disable bitwarden extension.
  6. Observe normal CPU usage.

Logging in, logging out or popping-out the extension has no effect.

Expected Result

Bitwarden extension does not impact CPU usage when playing audio in a background tab.

Actual Result

High(er than expected) CPU usage when playing audio in background tab.

Screenshots or Videos

2024-11-19-bitwarden-ffx-cpu.mp4

No other extensions enabled during the video. Observe the CPU usage spikes when the media tab is in the background when bitwarden is enabled.

Additional Context

This does not occur when playing video in the background

Profiler with bitwarden enabled https://share.firefox.dev/4fR5mb3

Zooming in on a hump in the marker chart shows a lot of time spent in setTimeout callback,
zoom1

If you focus the beginning of a hump, we see a call to setTimeout handler from the bitwarden extension.

zoom2

Then repeatedly we see many setTimeout callbacks firing, about every 5us.

zoom4
zoom3

Profiler with bitwarden disabled https://share.firefox.dev/4fS9lEy, no calls to setTimeout in marker chart.

zoom5

Operating System

Linux

Operating System Version

Archlinux 6.11.8-arch1-2

Web Browser

Firefox

Browser Version

Release 132.0.2 (64-bit), Developer edition 133.0b9 (64-bit)

Build Version

Version: 2024.10.1 (from extensions), 2024.11.0 (from gh release)

Issue Tracking Info

  • I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.
@rktjmp rktjmp added browser Browser Extension bug labels Nov 19, 2024
@bitwarden-bot
Copy link

Thank you for reporting this issue! We've added this to our internal tracking system.
ID: PM-15042

@cagonzalezcs
Copy link
Contributor

cagonzalezcs commented Nov 19, 2024

This is likely a duplicate of #12031 or is potentially related in scope.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser Browser Extension bug
Projects
None yet
Development

No branches or pull requests

3 participants