[wp-trac] [WordPress Trac] #32597: mediaelement.js high CPU usage in Firefox
WordPress Trac
noreply at wordpress.org
Thu Sep 17 14:12:44 UTC 2020
#32597: mediaelement.js high CPU usage in Firefox
--------------------------------+------------------------------
Reporter: afercia | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: External Libraries | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------------+------------------------------
Changes (by afercia):
* keywords: close =>
Comment:
> Leaving this open until someone that can reliably reproduce the issue
There you go (see attached screenshot).
Tested on a MacBook Pro end 2015 (not a brand new one but still powerful
enough). Notes:
- this now happens only with posts made with Classic Editor, as the block
editor uses the native `<video>` element thus browsers use their own
players
- worth noting that these posts will use mediaelement.js also in the front
end so the high CPU usage will happen also on the front end, which is
unfortunate
To reproduce:
- use Classic Editor
- add an audio
- mediaelement.js will display its player
- the easiest way to reproduce is by _not_ playing the audio and instead:
- search in the browser's dev tools for an element with CSS class `mejs-
time-buffereing`
- make it visible by unchecking `display: none` (see screenshot)
- the buffering CSS animation will appear
- monitor the CPU usage with Activity Monitor (on macOS) or other tools if
on Windows
- in my case, testing with Chrome 85, the CPU usage goes up to 63%, which
is crazy high
This can be a huge problem when the network is unstable and buffering
kicks in or when, as mentioned in the Slack conversation linked in the
ticket description, a post is left open in a browser tab for some time.
Worth also noting this ticket is 5 years old but it's still a problem for
millions of posts published with previous versions of WordPress where the
front end still uses mediaelement.js
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32597#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list