muban大师 发表于 2020-8-10 18:05:16

优化织梦CMS后台生成速度慢的方法

从dedecms官网论坛找到个合适的代码
       
        include/inc/inc_fun_SpGetArcList.php
        for($i=0;$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
        if($tpsql=="") $tpsql .= " And (".TypeGetSunID($reids[$i,,$dsql,'arc');
        else $tpsql .= " Or ".TypeGetSunID($reids[$i,,$dsql,'arc');
        }
        速度快好几倍,原理就是,副栏目不用参与了,极大的提高了运行速度。
       
        不过如果大家的 副栏目 使用的比较多,不建议用。
页: [1]
查看完整版本: 优化织梦CMS后台生成速度慢的方法