From 480c2fab049d03095ba85e06a3aab71e1da7b07b Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Wed, 10 Aug 2016 14:56:59 +0000 Subject: [PATCH] Performance optimization: do not load all the columns when it is not needed. SVN:trunk[4317] --- core/ormstopwatch.class.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/core/ormstopwatch.class.inc.php b/core/ormstopwatch.class.inc.php index ef5010011..f4dde0240 100644 --- a/core/ormstopwatch.class.inc.php +++ b/core/ormstopwatch.class.inc.php @@ -494,6 +494,7 @@ class CheckStopWatchThresholds implements iBackgroundProcess $sExpression = "SELECT $sClass WHERE {$sAttCode}_laststart AND {$sAttCode}_{$iThreshold}_triggered = 0 AND {$sAttCode}_{$iThreshold}_deadline < '$sNow'"; $oFilter = DBObjectSearch::FromOQL($sExpression); $oSet = new DBObjectSet($oFilter); + $oSet->OptimizeColumnLoad(array($sAttCode)); while ((time() < $iTimeLimit) && ($oObj = $oSet->Fetch())) { $sClass = get_class($oObj);