织梦由于生成静态文件原因及系统架构本身的原因,当数量达到万级别后,生成栏目及文档相当缓慢,今天织梦58介绍下,通过改动系统文件来提升生成速度,修改之前请大家做好织梦程序的备份。
打开: include/arc.listview.class.php
找到以下代码并注释(注释代码为:/*代码*/):
查看源码 //获得交叉栏目ID /*if($this->TypeLink->TypeInfos['cross']>0 && $this->TypeLink->TypeInfos['ispart']==0) { $selquery = ''; if($this->TypeLink->TypeInfos['cross']==1) { $selquery = "SELECT id,topid FROM `dede58_arctype` WHERE typename LIKE '{$this->Fields['typename']}' AND id<>'{$this->TypeID}' AND topid<>'{$this->TypeID}' "; } else { $this->Fields['crossid'] = preg_replace('/[^0-9,]/', '', trim($this->Fields['crossid'])); if($this->Fields['crossid']!='') { $selquery = "SELECT id,topid FROM `dede58_arctype` WHERE id in({$this->Fields['crossid']}) AND id<>{$this->TypeID} AND topid<>{$this->TypeID} "; } } if($selquery!='') { $this->dsql->SetQuery($selquery); $this->dsql->Execute(); while($arr = $this->dsql->GetArray()) { $this->CrossID .= ($this->CrossID=='' ? $arr['id'] : ','.$arr['id']); } } }*/ |
继续查找并注释:
//获得附加表的相关信息 /*$addtable = $this->ChannelUnit->ChannelInfos['addtable']; if($addtable!="") { $addJoin = " LEFT JOIN `$addtable` ON arc.id = ".$addtable.'.aid '; $addField = ''; $fields = explode(',',$this->ChannelUnit->ChannelInfos['listfields']); foreach($fields as $k=>$v) { $nfields[$v] = $k; } if(is_array($this->ChannelUnit->ChannelFields) && !empty($this->ChannelUnit->ChannelFields)) { foreach($this->ChannelUnit->ChannelFields as $k=>$arr) { if(isset($nfields[$k])) { if(!empty($arr['rename'])) { $addField .= ','.$addtable.'.'.$k.' as '.$arr['rename']; } else { $addField .= ','.$addtable.'.'.$k; } } } } } else { $addField = ''; $addJoin = ''; }*/ |
上一篇:
下一篇:
版权声明: 本站资源均来自互联网或会员发布,如果侵犯了您的权益请与我们联系,我们将在24小时内删除!谢谢!
转载请注明: dedecms织梦数据量达到万级后 生成速度很慢解决办法