jakearchibald/svgomg

Revisit `setTimeout` usage/JS animations

Open

#332 aperta il 29 set 2021

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)JavaScript (474 fork)batch import
enhancementhelp wanted

Metriche repository

Star
 (5473 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

There are known performance issues with setTimeout. IIRC requestAnimationFrame should behave better.

I notice junky settings checkboxes animation on Firefox for Android when Power Saving is enabled on the device. Not sure it's related, but it would probably be better to use rAF anyway?

EDIT: we are also using offsetLeft is ripple. Not sure if there's a better way to do the same thing nowadays.

Guida contributor