Fastdom - Eliminates layout thrashing by batching DOM read/write operations

added by bpwndaddy
7/6/2015 2:47:55 PM

1188 Views

FastDom works as a regulatory layer between your app/library and the DOM. By batching DOM access we avoid unnecessary document reflows and speed up layout perfomance dramatically. Each read/write job is added to a corresponding read/write queue. The queues are emptied (reads, then writes) at the turn of the next frame using window.requestAnimationFrame. FastDom aims to behave like a singleton across all modules in your app. When any module requires 'fastdom' they get the same instance back, meaning FastDom can harmonize DOM access app-wide. Potentially a third-party library could depend on FastDom, and better integrate within an app that itself uses it.


0 comments