тормозит сам сайт
а подвале показатели...
1. На хостинге, похоже, периодически очень тормозит сервер MySQL (при 0 запросов время более полсекунды), хотя задержки не всегда – это не лечится, только сменой хостинга.
2. Какие-то сниппеты тратят очень много времени – со стороны выяснить нельзя, надо пробовать отключать разные сниппеты и смотреть на результат. После того, как определится виновник, можно думать о его оптимизации.
спасибо огромное, буду искать
На форуме об этом писалось, правда форум так функционирует, что найти что-то невозможно.
Надо в файле wayfinder.inc.php вместо строки:
$ids = $modx->getChildIds($this->_config[’id’],$this->_config[’level’]);
подставить:
if (!$this->_config['hideSubMenus']) {
$ids = $modx->getChildIds($this->_config['id'],$this->_config['level']);
} else { // then hideSubMenus is checked, we don`t need all children
// first we always included the chilren of startId document
// this fix problem with site root chidrens,
// because site root not included in $modx->getParentIds
$ids = $modx->getChildIds($this->_config['id'], 1, $ids);
$parents = array($modx->documentIdentifier);
$parents += $modx->getParentIds($modx->documentIdentifier);
// if startId not in parents, only show children of startId
if ($this->_config['id'] == 0 || in_array($this->_config['id'], $parents)){
//remove parents higher than startId(including startId)
$startId_parents = array($this->_config['id']);
$startId_parents += $modx->getParentIds($this->_config['id']);
$parents = array_diff($parents, $startId_parents);
//remove parents lower than level of startId + level depth
$level = $this->_config['level'];
if ($level == 0)
$level = 10; // constant getted from getParentIds function
$parents = array_slice(array_reverse($parents), 0, $level-1);
foreach($parents as $p)
$ids = $modx->getChildIds($p, 1, $ids);
}
}