FortAwesome / Font-Awesome

The iconic SVG, font, and CSS toolkit
https://fontawesome.com
Other
73.54k stars 12.2k forks source link

animation high GPU load #18295

Open batobolg opened 3 years ago

batobolg commented 3 years ago

I using google chrome monitoring GPU load, animating-icons is spend a lot GPU load. https://fontawesome.com/v5.15/how-to-use/on-the-web/styling/animating-icons it is the simple animation why use so mach GPU? BTW. I am using SVG version.

tagliala commented 3 years ago

Hi!

Thanks for being part of the Font Awesome Community.

I think we can't do much about this, but any hint on how to improve the performance of this animation is welcomed

On my old machine, all animations uses ~ 20% of GPU, and I remember that I did some tests with 3D animations at the time but the results were the same

Demos:

SVG and CSS implementations have the same performance:

SVG with 3D rotation is not much better:

Bootstrap spinners seem to have the same performance:

@robmadole should we add a performance warning on the docs?

edit: on my Mac I'm getting the best results with 2D transform and CSS