web-animations / web-animations-next

Development repository for web-animations-js:
https://github.com/web-animations/web-animations-js
Apache License 2.0
121 stars 30 forks source link

Performance in polyfilled browsers (Memory/GC?) #486

Open Martin-Pitt opened 8 years ago

Martin-Pitt commented 8 years ago

In Safari & Firefox this usecase seems to slow down dramatically, any ideas? Is it the GC kicking in?

http://greensock.com/js/speed.html (Set engine to Web Animations)

birtles commented 8 years ago

For Firefox if you're using 48 or later you might hit bug 1253476. It can easily be fixed by just dropping fill: "forwards".

But for any browser, the test case uses width and height for scale instead of transform so it's going to trigger layout and not be able to be run on the compositor (although given the size of the elements being animated they're not likely to be layerized anyway unless you can use will-change to persuade the browser otherwise). So basically, it's very suboptimal use of the API.

alancutter commented 8 years ago

There's a new release that includes a performance optimisation, can your example be updated to use that? https://github.com/web-animations/web-animations-js/releases/tag/2.2.2

Martin-Pitt commented 8 years ago

I'm not affiliated with the greensock example, have linked them to your comment though.