emberjs / list-view

An incremental rendering list view for Ember.js
MIT License
465 stars 116 forks source link

Wrap callback to ember run bind #244

Closed AmilKey closed 9 years ago

stefanpenner commented 9 years ago

nope, this one isn't supposed to be wrapped in a bind.

Basically, only very a small subset of the scroll events must actually trigger ember mutations. So we handle that internally.

You are likely observing scrollTop, which is not currently supported.

AmilKey commented 9 years ago

@stefanpenner what are scroll events should trigger ember mutations?

stefanpenner commented 9 years ago

@stefanpenner what are scroll events should trigger ember mutations?

Basically, we only need to enter ember world, when a view is recycled. Although we may receive scroll events extremely often and quickly. We only need to update the scrolling slabs position each scroll event.

Every 1/8 or so scroll events (depending on the scroll rate) we need to recycle views, this is the only time we actually need to enter the run-loop.

Desktop browsers wont notice but some of our slower mobile browsers will notice.

AmilKey commented 9 years ago

@stefanpenner ok, i understand you, think one may close pull request.

stefanpenner commented 9 years ago

@stefanpenner ok, i understand you, think one may close pull request.

Sometime in the future i hope to restore this functionality. Likely as devices get faster, and as ember gets faster :)