wilsonpage / fastdom

Eliminates layout thrashing by batching DOM measurement and mutation tasks
6.85k stars 240 forks source link

Add an example use case for animation #25

Closed georgecrawford closed 11 years ago

georgecrawford commented 11 years ago

See example at http://georgecrawford.github.io/fastdom/examples/animation.html. It's an adaptation of the Google Developers article (https://developers.google.com/chrome-developer-tools/docs/demos/too-much-layout/). In the article, forced synchronous layouts are fixed by simply not doing any reads at all. Rather than that brutal solution, which will not be appropriate for many use cases, we instead use fastdom to intelligently defer and batch the DOM reads and writes, and get similar performance gains as a result.