-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speedup suggestions #254
Comments
Looks good. Can you make a pull request for these? If not I can also copy paste them in. |
+1 for this fix. I noticed a massive improvement in speed for my page which has 100+ images. |
Add the timeout for resize too
|
The throttling above would not lazy load while scrolling but only when you stop scrolling. That of course is much faster but also does not load the images :) I added a pull request which throttles the requests to 0.25 seconds. |
Hi Tuupola,
Thanks for this jQuery script, works just perfectly and love the placeholder option :) just two notes if I may which are related to speeding things up, not sure if there are any good but please have a look on it and maybe you will find them useful.
1 . Remove loaded element from the elements lists so scrolling will be much faster and less resource hungry as right now even if all images loaded scrolling will always call update() and that goes trough the elements even if they are loaded.
I tested this with 200+ images and did a Performance test on scrolling and Total cost went down from ~60% to ~5%
2 . Calling update() with timeout on scroll event will speed up scrolling too but also the best it will allow you to quickly jump to the bottom of the list (or any part of it) by grabbing the scrollbar without lazyload to start loading images in wain.
Hope you will find the above things useful and thanks again for the plugin!
Regards,
Julius
The text was updated successfully, but these errors were encountered: