[wp-trac] [WordPress Trac] #35296: Image editor spinner and high CPU usage
WordPress Trac
noreply at wordpress.org
Sun Jan 3 16:37:32 UTC 2016
#35296: Image editor spinner and high CPU usage
--------------------------+-----------------
Reporter: afercia | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.5
Component: Media | Version: 4.4
Severity: normal | Keywords:
Focuses: ui |
--------------------------+-----------------
Similar to other spinner performance-related issues, see #31196, #33311,
#33322, and #34951.
In the image editor (both in the Media Library and in the Media Modal),
when performing an action a semi-transparent layer appears with a spinner
set as background.
While on powerful machines with a modern CPU and a dedicated GPU there's
just a barely noticeable CPU usage increment, on older machines the
spinner set on a so large area, especially when this area is semi-
transparent, can make the CPU usage grow significantly and also get stuck
at 100%.
Tested on a very old desktop PC with Windows XP and Firefox 43, the time
required for a single image "flip" decreases from '''minutes''' to about 2
seconds when removing the spinner.
As a best practice, spinners used as backgrounds should always be set on
the smallest possible area. In this specific case there's no need to
completely remove the spinner when the action completes because it's
already in a `<div>` that gets hidden with `display: none`.
See in the screenshot below: before the patch the whole image editor area
gets continuously re-painted while after the patch it happens only on the
20x20 pixels spinner area.
[[Image(https://cldup.com/-FbBiJKev6.png)]]
[[Image(https://cldup.com/8oh9_9F43G.png)]]
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35296>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list