Closed SimonSapin closed 5 years ago
hiikezoe mentioned "To be precise, bug 1190721 is also necessary to reduce the CPU usage, so we still need to wait for firefox 58."
I'm on: Firefox 58 b9 TST 2.3.0
Not sure when the relevant commit is supposed to be released, but for me disabling the throbber still results in considerably less CPU during page loads. I also sometimes had the issue where the throbber wouldn't stop (probably a Firefox bug), which caused full CPU usage; the laptop fans would start.
(I used the following code to disable the throbber, but it might be imperfect or overkill - I'm far from a CSS expert.) .throbber { display: none !important; } .throbber::before { animation: unset !important; }
@Omen-of-Peace I guess you might need to set display:none for #master-throbber element. It's the only one animating element for all throbbers in TST, IIUC.
I close this because outdated.
Short description
The
@keyframes throbber
animation is expensive. "Normal" tabs in Firefox 57 / 58 have a similar-looking animation but it’s implemented in a completely different way:border-radius: 100%
, and animates thewidth
andleft
properties.chrome://browser/skin/tabbrowser/loading.svg
) as a background-image in a pseudo-element that animatestransform: translateX(…)
with asteps(60)
timing function.As far as I understand, the latter is cheaper in current Firefox because things with animated
transform
are often painted into a separate layer that can be preserved and re-composited without re-painting when the transform changes. In comparison, changing the width of something withborder-radius
requires re-painting it.Steps to reproduce
netcat -l 8888
or some other command to start a TCP server that will accept an HTTP request but never send a responseExpected result
This animation by itself should not use a significant amount of resources.
Actual result
Firefox uses 40% ~ 80% CPU even though it is doing nothing else. This makes loading actual pages slower.
Environment