Closed dbuenzli closed 4 years ago
Just another data point. The cost of an empty requestAnimationFrame
callback that simply reschedules itself (doesn't fire Useri
's timer and refresh events) varies from 1.4ms to 2ms in Safari while it only takes 0.075ms to 0.1ms in Chrome.
So I investigated a bit. And it seems that the problem is in the canvas rendering performance (i.e. the call to
Vgr.render
). The numbers are rather astonishing. One thing I don't get is why Safari doesn't call us more often for animating as we are still below the 16ms limit for getting a 60Hz animation.Here's an example of the render frame timings for a transition in the three browsers:
Chrome
Firefox
Safari