Optimizations: DBObjectSet::Count does it without loading all the data + possibility to specify LIMIT + restored the query cache (was inoperant) + improved the debug reports + added two settings (query_cache_enabled and debug_queries)

SVN:trunk[756]
This commit is contained in:
Romain Quetiez
2010-09-03 21:23:37 +00:00
parent 65b669f27f
commit a9c0ba63df
6 changed files with 174 additions and 53 deletions

View File

@@ -438,7 +438,6 @@ abstract class cmdbAbstractObject extends CMDBObject
$aAttribs[$sAttCode] = array('label' => MetaModel::GetLabel($sClassName, $sAttCode), 'description' => MetaModel::GetDescription($sClassName, $sAttCode));
}
$aValues = array();
$oSet->Seek(0);
$bDisplayLimit = isset($aExtraParams['display_limit']) ? $aExtraParams['display_limit'] : true;
$iMaxObjects = -1;
if ($bDisplayLimit)
@@ -446,8 +445,10 @@ abstract class cmdbAbstractObject extends CMDBObject
if ($oSet->Count() > utils::GetConfig()->GetMaxDisplayLimit())
{
$iMaxObjects = utils::GetConfig()->GetMinDisplayLimit();
$oSet->SetLimit($iMaxObjects);
}
}
$oSet->Seek(0);
while (($oObj = $oSet->Fetch()) && ($iMaxObjects != 0))
{
$aRow = array();