Skip to content

Cache the scrollTop/scrollLeft#25

Open
blasten wants to merge 1 commit intomasterfrom
scroll-perf
Open

Cache the scrollTop/scrollLeft#25
blasten wants to merge 1 commit intomasterfrom
scroll-perf

Conversation

@blasten
Copy link
Copy Markdown
Contributor

@blasten blasten commented Nov 4, 2016

DON'T MERGE YET.

This work should help prevent layout thrashing when multiple elements are consuming scroll position and doing writes in their scroll handlers.

The general idea is to cache the first read of scrollTop/scrollLeft, so that subsequent reads are cached. Elements doing work in their scroll handlers aren't allowed to read props that trigger layout without caching them upfront. Writes from scroll handlers are allowed.

Should help for #18 and PolymerElements/iron-list#331

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants