Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/88.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript tumblr上的慢查询和滚动响应?_Javascript_Jquery_Performance_Tumblr_Infinite Scroll - Fatal编程技术网

Javascript tumblr上的慢查询和滚动响应?

Javascript tumblr上的慢查询和滚动响应?,javascript,jquery,performance,tumblr,infinite-scroll,Javascript,Jquery,Performance,Tumblr,Infinite Scroll,我使用的代码比我以前使用的代码快: $(窗口)。加载(函数(){ var$wall=$('.posts'); $wall.imagesLoaded(函数(){ $wall.Mashiness({ itemSelector:“.entry”, isAnimated:错 }); }); $wall.infinites卷({ 导航选择器:“div#navigation”, 下一个选择器:“分区#导航a#下一页”, itemSelector:“.entry”, bufferPx:2000, 调试:

我使用的代码比我以前使用的代码快:


$(窗口)。加载(函数(){
var$wall=$('.posts');
$wall.imagesLoaded(函数(){
$wall.Mashiness({
itemSelector:“.entry”,
isAnimated:错
});
});
$wall.infinites卷({
导航选择器:“div#navigation”,
下一个选择器:“分区#导航a#下一页”,
itemSelector:“.entry”,
bufferPx:2000,
调试:错误,
errorCallback:函数(){
$(“#infscr加载”).fadeOut('normal');
}},
函数(新元素){
var$newElems=$(新元素);
$newElems.hide();
$newElems.imagesLoaded(函数(){
$wall.mashise('added',$newElems,{isAnimated:false},function(){$newElems.fadeIn('slow');});
});
})$('.posts')。show(500);
});
$.fn.changebackgroundColor=函数(msg){
$(“#perma”).css(“#000”);

但它仍然相当慢,有一个延迟的帖子加载,我想知道是什么,我可以改变。我使用了3列,总共大约1100px。文档中的问题可能与
bufferPx
属性有关

             bufferPx     : 40,
             // increase this number if you want infscroll to fire quicker
             // (a high number means a user will not see the loading message)
             // new in 1.2
             // default: 40

如果调整该值没有明显的影响,则可能只是加载时间,具体取决于加载的数据量。

如果在发布脚本时对脚本进行格式化/缩进,这将非常有帮助。如果你的编辑器没有一个很好的重新格式化工具,你可以使用谢谢你,这就是我的想法。我试图提高号码,但没有改变任何事情,我想这是正常的加载时间。你能把我和你用过的文件联系起来吗?再次感谢。
             bufferPx     : 40,
             // increase this number if you want infscroll to fire quicker
             // (a high number means a user will not see the loading message)
             // new in 1.2
             // default: 40