mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-21 16:22:20 +02:00
Optimized the setup (not only), shortened to 37s (used to be 120s)
- DBObject::DBInsert(Tracked)NoReload() must be used when it is not required to use the object - MetaModel::GetObject() has a cache, the operation is 5 times faster - Changes tracking do not store the initial value, but only value changes Reworked the CSV import to have it rely on the bulk change API Bulk change to check the external keys (DB integrity) Replaced trigger_error (Core only!) by the use of Exceptions (still, some new Exception classes should be defined) Unit tests do display the call stack in a user friendly format SVN:code[52]
This commit is contained in:
@@ -170,11 +170,6 @@ class DBObjectSet
|
||||
$this->m_aId2Row[$oObject->GetKey()] = $iNextPos;
|
||||
}
|
||||
|
||||
public function RemoveObject($iRow)
|
||||
{
|
||||
trigger_error("#@# not implemented! ca sert a quoi ?");
|
||||
}
|
||||
|
||||
public function AddObjectArray($aObjects)
|
||||
{
|
||||
foreach ($aObjects as $oObj)
|
||||
@@ -187,7 +182,7 @@ class DBObjectSet
|
||||
{
|
||||
if ($this->GetRootClass() != $oObjectSet->GetRootClass())
|
||||
{
|
||||
trigger_error("Could not merge two objects sets if they don't have the same root class");
|
||||
throw new CoreException("Could not merge two objects sets if they don't have the same root class");
|
||||
}
|
||||
if (!$this->m_bLoaded) $this->Load();
|
||||
|
||||
@@ -202,7 +197,7 @@ class DBObjectSet
|
||||
{
|
||||
if ($this->GetRootClass() != $oObjectSet->GetRootClass())
|
||||
{
|
||||
trigger_error("Could not 'intersect' two objects sets if they don't have the same root class");
|
||||
throw new CoreException("Could not 'intersect' two objects sets if they don't have the same root class");
|
||||
}
|
||||
if (!$this->m_bLoaded) $this->Load();
|
||||
|
||||
@@ -223,7 +218,7 @@ class DBObjectSet
|
||||
{
|
||||
if ($this->GetRootClass() != $oObjectSet->GetRootClass())
|
||||
{
|
||||
trigger_error("Could not 'delta' two objects sets if they don't have the same root class");
|
||||
throw new CoreException("Could not 'delta' two objects sets if they don't have the same root class");
|
||||
}
|
||||
if (!$this->m_bLoaded) $this->Load();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user