Your claimed GPU usage seems really high for a simple spinner, even considering the CPU is pretty old. I wonder if there's some other problem going on with your setup.
I don't think so. This is just what happens when you redraw the screen.
Doing it 30x more frequent than needed costs more, no matter if it's only 1 pixel.
This problem is not isolated to me or to just one machine. Check out the chromium bug about the tab loading spinner, for example. It is a "simple" spinner as well.
Or the Zed editor, which spams screen redraws even when nothing changes at all, so it has high GPU usage for still picture.
But it does. The GPU rerenders your entire screen with all its pixels, even if you change only one. The only thing you can do to avoid that is to not ask the GPU to render a frame. For that you need to reduce FPS.
Avoiding unnecessary browser repaint of the rest of the page is a basic technique and often already done correctly. If people don't do that, it's just ultra-bad.
But do really have the CPU/GPU go idle, you need to not use them; the only solution to that is to show still images, aka reduce FPS.
I truly wish i could get everything to use the ticking clock one at 1Hz (or maybe 0.5) for spinners, animation in user interfaces causes me anguish in general, so i have to go around filtering them on webapps.
Those aren’t spinners (also called numeric updowns, see [1]). Those are throbbers (also called loading icons, see [2]).
[1]: https://en.wikipedia.org/wiki/Spinner_(computing)
[2]: https://en.wikipedia.org/wiki/Throbber
> [1]: https://en.wikipedia.org/wiki/Spinner_(computing)
Hah, I did not expect that. I can't imagine any end users will be able to name that one.
That’s not how language works.
That is how language works.
The general public says: no.
To be fair, those do spin, while "spinners" don't.
Your claimed GPU usage seems really high for a simple spinner, even considering the CPU is pretty old. I wonder if there's some other problem going on with your setup.
I don't think so. This is just what happens when you redraw the screen.
Doing it 30x more frequent than needed costs more, no matter if it's only 1 pixel.
This problem is not isolated to me or to just one machine. Check out the chromium bug about the tab loading spinner, for example. It is a "simple" spinner as well.
Or the Zed editor, which spams screen redraws even when nothing changes at all, so it has high GPU usage for still picture.
It should not cost a visible fraction of CPU/GPU to update a little sprite even at 30fps.
But it does. The GPU rerenders your entire screen with all its pixels, even if you change only one. The only thing you can do to avoid that is to not ask the GPU to render a frame. For that you need to reduce FPS.
I'm on mobile so I'm not able to check, but can the will-change and contain attributes reduce the cost?
Avoiding unnecessary browser repaint of the rest of the page is a basic technique and often already done correctly. If people don't do that, it's just ultra-bad.
But do really have the CPU/GPU go idle, you need to not use them; the only solution to that is to show still images, aka reduce FPS.
I truly wish i could get everything to use the ticking clock one at 1Hz (or maybe 0.5) for spinners, animation in user interfaces causes me anguish in general, so i have to go around filtering them on webapps.