織夢(mèng)由于生成靜態(tài)文件原因及系統(tǒng)架構(gòu)本身的原因,當(dāng)數(shù)量達(dá)到萬級(jí)別后,生成欄目及文檔相當(dāng)緩慢,今天織夢(mèng)58介紹下,通過改動(dòng)系統(tǒng)文件來提升生成速度,修改之前請(qǐng)大家做好織夢(mèng)程序的備份。
打開: 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']); } } }*/ |
繼續(xù)查找并注釋:
//獲得附加表的相關(guān)信息 /*$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 = ''; }*/ |
上一篇:
下一篇:
版權(quán)聲明: 本站資源均來自互聯(lián)網(wǎng)或會(huì)員發(fā)布,如果侵犯了您的權(quán)益請(qǐng)與我們聯(lián)系,我們將在24小時(shí)內(nèi)刪除!謝謝!
轉(zhuǎn)載請(qǐng)注明: dedecms織夢(mèng)數(shù)據(jù)量達(dá)到萬級(jí)后 生成速度很慢解決辦法