performance improvement

This commit is contained in:
Roland Gruber 2009-11-27 19:06:05 +00:00
parent 7852678420
commit 3eb2a1b951
1 changed files with 6 additions and 3 deletions

View File

@ -247,9 +247,11 @@ class lamList {
$entries = array(); $entries = array();
$filter = $this->listBuildFilter(); $filter = $this->listBuildFilter();
$attributes = array_keys($filter); $attributes = array_keys($filter);
for ($r = 0; $r < sizeof($this->entries); $r++) { $attributeCount = sizeof($attributes);
$entryCount = sizeof($this->entries);
for ($r = 0; $r < $entryCount; $r++) {
$skip = false; $skip = false;
for ($a = 0; $a < sizeof($attributes); $a++) { for ($a = 0; $a < $attributeCount; $a++) {
// check if filter fits // check if filter fits
$found = false; $found = false;
for ($i = 0; $i < sizeof($this->entries[$r][$attributes[$a]]); $i++) { for ($i = 0; $i < sizeof($this->entries[$r][$attributes[$a]]); $i++) {
@ -834,7 +836,8 @@ class lamList {
// delete first array entry which is "count" // delete first array entry which is "count"
unset($info['count']); unset($info['count']);
// save position in original $info // save position in original $info
for ($i = 0; $i < sizeof($info); $i++) { $infoCount = sizeof($info);
for ($i = 0; $i < $infoCount; $i++) {
$info[$i]['LAM_ID'] = $i; $info[$i]['LAM_ID'] = $i;
if (isset($info[$i]['count'])) unset($info[$i]['count']); if (isset($info[$i]['count'])) unset($info[$i]['count']);
} }