织梦怎么加速文章页显示速度

王林
王林 原创
2019-11-07 09:41:38 1557浏览

一、要进入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’);

查找:

$orwhere .= " And ( arc.typeid in ($sonids) Or arc.typeid2 in ($sonids) ) "

替换为:

$orwhere .= " And arc.typeid in ($sonids) ";

具体优化步骤: 

1、关闭副栏目,生成速度从50秒20页降到20秒20页

2、删除文档模版中的调用随机文档的标签(即arclist中带有sort=rand的)开启后台中能找到的所有缓存,生成速度从20秒20页降到6秒多一页

3、删除文档模版中的相关文档,生成速度从6秒猛降到不到一秒

推荐教程:dedecms教程

以上就是织梦怎么加速文章页显示速度的详细内容,更多请关注php中文网其它相关文章!

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。