hilongjw / vue-lazyload

A Vue.js plugin for lazyload your Image or Component in your application.
http://hilongjw.github.io/vue-lazyload/
MIT License
8.01k stars 868 forks source link

Slow image loading when scrolling with trackpad in chrome #231

Open arnoson opened 6 years ago

arnoson commented 6 years ago

Hello, when using vue-lazyload in chrome (65) and scrolling with the trackpad of an macbook air (MacOS 10.10.5) my images load really slow (testing it in localhost so internet connection can't be the problem). When I scroll by dragging the scrollbar everything works fine and image load fast (in my case 50 - 100ms), the same image takes up to 3 seconds when scrolling with the trackpad! In Firefox everything works fine no matter how I scroll.

arnoson commented 6 years ago

here is a jsfiddle of the problem: https://jsfiddle.net/arnoson/1vegqp5e/1/ when scrolling really fast all the way down with the scrollbar loading times are okay, doing the same with the trackpad gives quite long loading times (in my case the same image took about 3 times as long to load)

xxn520 commented 6 years ago

same issue

alianrock commented 6 years ago

same issue

cloudbluedigital commented 6 years ago

any solution for this?

nickvonh commented 6 years ago

+1 to this issue

c0elha commented 4 years ago

try

Vue.use(VueLazyload, {
  preLoad: 1.75,
  lazyComponent: true,
  observer: true,
  attempt: 1,
  listenEvents: [
      'scroll', 'wheel', 'mousewheel', 'resize', 
      'animationend', 'transitionend', 'touchmove', 'touchend'
  ]
});