您的位置:首页 > 其它

Dedecms 生成速度慢 的解决办法

2009-08-02 20:02 387 查看
从dedecms官网论坛找到个合适的代码

include/inc/inc_fun_SpGetArcList.php

for($i=0;$i<$ridnum;$i++){ 
if($tpsql=="") $tpsql .= " And ( (".TypeGetSunID($reids[$i],$dsql,'arc')." Or arc.typeid2='".$reids[$i]."') "; 
else $tpsql .= " Or (".TypeGetSunID($reids[$i],$dsql,'arc')." Or arc.typeid2='".$reids[$i]."') "; 
}

//上面的这段注释掉,用下面的替换

for($i=0;$i<$ridnum;$i++){ 
if($tpsql=="") $tpsql .= " And (".TypeGetSunID($reids[$i],$dsql,'arc'); 
else $tpsql .= " Or ".TypeGetSunID($reids[$i],$dsql,'arc'); 
}

速度快好几倍,原理就是,副栏目不用参与了,极大的提高了运行速度。

不过如果大家的 副栏目 使用的比较多,不建议用。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: