WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 9 days ago

#32597 new defect (bug)

mediaelement.js high CPU usage in Firefox

Reported by: afercia Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: External Libraries Keywords: reporter-feedback
Focuses: Cc:
PR Number:

Description

Noticed by @iseulde, see discussion here:
https://wordpress.slack.com/archives/core-editor/p1433862939000659

Also reproduced on my (very old) machine that makes things very evident. Looks like mediaelement.js audio uses a linear gradient animation on the mejs-time-buffering element which triggers a Firefox bug. I remember similiar issues in Firefox reported years ago and probably never fully fixed. Should probably be reported upstream. See screenshot:

https://cldup.com/tAifYTyqQw.png

Removing that element from the DOM makes the CPU usage go down to 0.

Change History (4)

This ticket was mentioned in Slack in #core-editor by afercia. View the logs.


4 years ago

#2 @iseulde
4 years ago

  • Component changed from General to External Libraries

#3 @Hareesh Pillai
9 days ago

  • Keywords reporter-feedback added

Hi @iseulde and @afercia,

The mediaelement.js library has been updated to v4.2.13 in #46681
Can you please confirm if this bug still exists?

#4 @afercia
9 days ago

@hareesh-pillai just tested with latest Firefox 69 on a macBook Pro. Seems when the mejs-time-buffering element is hidden with display: none; the CPU usage is normal. So this seems to be improved, as previously the CPU usage increase was happening also with the element hidden.

As soon as the element with its animation gets visible, the CPU usage increases to ~ 20% on my machine. On less powerful hardware the increase is likely way higher. Normally, mejs-time-buffering should be visible for a few seconds or even less but I'd say it still produces an undesirable side effect.

Note: See TracTickets for help on using tickets.