Dedecms 生成速度慢 的解决办法
2015-07-14 09:27
399 查看
从dedecms官网论坛找到个合适的代码
include/inc/inc_fun_SpGetArcList.php
//上面的这段注释掉,用下面的替换
速度快好几倍,原理就是,副栏目不用参与了,极大的提高了运行速度。
不过如果大家的 副栏目 使用的比较多,不建议用。
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'); }
速度快好几倍,原理就是,副栏目不用参与了,极大的提高了运行速度。
不过如果大家的 副栏目 使用的比较多,不建议用。
相关文章推荐
- nodejs连接mysql查询 第一次不报错 之后一直报错Cannot enqueue quit after invoking quit.
- Code Conventions for the JavaScript Programming Language
- 使用box-sizing让拥有padding属性的元素不超出想要的宽度
- elasticsearch 断路器设置
- [刷题]Fizz Buzz
- Java IO最详解
- 解决Android Studio中某一个Module不能启动的问题
- UIButton 的使用
- 【IMOOC学习笔记】多种多样的App主界面Tab实现方法(二)
- [LeetCode] Valid Palindrome
- 顺序表的有关增强练习
- 2014-2015中国微商研究报告
- 网络处理1-异步GET请求
- hadoop学习之基础Java GC详解
- Rails性能分析
- caffe study(5) - AlexNet 之算法篇
- UIView 的使用
- HDU 1004 Let the Balloon Rise
- OC数组 NSArray的4种遍历方式
- 多线程编程1-NSThread