Skip to content
This repository has been archived by the owner on Jun 9, 2022. It is now read-only.

Setting up multiple scrollers causing 'layout thrashing' #62

Open
wilsonpage opened this issue Oct 11, 2013 · 0 comments
Open

Setting up multiple scrollers causing 'layout thrashing' #62

wilsonpage opened this issue Oct 11, 2013 · 0 comments

Comments

@wilsonpage
Copy link
Contributor

Below you can see a timeline graph of three scrollers being set up. Each setup operation causes a read and a write operation to the DOM, and therefore results in three layouts/reflows in this particular frame, blowing our 60fps frame budget.

screen shot 2013-10-11 at 11 52 55

Options

  • A. Offer a more granular API that gives the user the option of batching the reads and writes to prevent this thrashing, e.g. scroller.calc() and scroller.set() (favoured).
  • B. Use a library like FastDom internally (easiest).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant