简体   繁体   English

加载大量数据/内容时,网站滚动缓慢

[英]scrolling of website is slow when large amount of data/content is loaded

When on my website large amount of data like picture and gallery slider and data along with animation is being loaded it causes the scrolling of the page slow. 当在我的网站上加载大量数据(如图片和图库滑块)以及数据以及动画时,会导致页面滚动缓慢。 when I try to scroll the page through the arrow keys the scrolling becomes almost zero with lags between them. 当我尝试通过箭头键滚动页面时,滚动几乎变为零,并且它们之间存在滞后。 all the javascript files and css are being loaded from cdn links. 所有的javascript文件和CSS均从CDN链接加载。 is there any specific reason why it is getting slow scrolling. 是否有任何特定原因导致其滚动速度变慢。 I have used AngularJS. 我用过AngularJS。

This is just a guess, but you need to optimize all your photos for whatever size you are displaying it for because they are likely too large. 这只是一个猜测,但是您需要针对显示的大小优化所有照片,因为它们可能太大。 You can use this link to create your new image files: 您可以使用此链接来创建新的图像文件:

http://optimizilla.com/ http://optimizilla.com/

Using the one time binding with angular and increasing the gallery sliding time and there are many way in which angular can be optimised. 使用带有角度的一次性绑定并增加画廊的滑动时间,并且可以通过多种方法来优化角度。 https://www.binpress.com/tutorial/speeding-up-angular-js-with-simple-optimizations/135 https://www.binpress.com/tutorial/speeding-up-angular-js-with-simple-optimizations/135

It helped in my case 对我而言,它有所帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM