thenikso / angular-inview

AngularJS directive to check if a DOM element is in the browser viewport.
http://thenikso.github.io/angular-inview/
MIT License
480 stars 112 forks source link

Lagging on scroll list #61

Closed do-web closed 9 years ago

do-web commented 9 years ago

I have a long list, if i scroll the list the list is lagging. The in view attr is on all list items.

clementlamoureux commented 9 years ago

+1

thenikso commented 9 years ago

Well if the list is very long maybe this is not the proper directive. Maybe something like this https://github.com/sroze/ngInfiniteScroll would be more appropriated.

In general, having too many inview on items might make the scrolling laggy because the scroll event on the window will trigger a handler that will then have to do a lot of work. The best solution is to have fewer inview elements