Ignore:
Timestamp:
12/18/12 16:15:29 (11 years ago)
Author:
douglasz
Message:

Ticket #3236 - Correcoes para Performance: Function Within Loop Declaration.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/library/PEAR/PEAR/PackageFile/v2.php

    r7655 r7673  
    329329        $mymaintainers = $this->getMaintainers(); 
    330330        $yourmaintainers = $pf1->getMaintainers(); 
    331         for ($i1 = 0; $i1 < count($yourmaintainers); ++$i1) { 
     331        $yourmaintainers_count = count($yourmaintainers); 
     332        for ($i1 = 0; $i1 < $yourmaintainers_count; ++$i1) { 
    332333            $reset = false; 
    333             for ($i2 = 0; $i2 < count($mymaintainers); ++$i2) { 
     334            $mymaintainers_count = count($mymaintainers); 
     335            for ($i2 = 0; $i2 < $mymaintainers_count; ++$i2) { 
    334336                if ($mymaintainers[$i2]['handle'] == $yourmaintainers[$i1]['handle']) { 
    335337                    if ($mymaintainers[$i2]['role'] != $yourmaintainers[$i1]['role']) { 
     
    12131215            } 
    12141216 
    1215             for ($i = 0; $i < count($releases['configureoption']); ++$i) { 
     1217            $releases_count = count($releases['configureoption']); 
     1218            for ($i = 0; $i < $releases_count; ++$i) { 
    12161219                $releases['configureoption'][$i] = $releases['configureoption'][$i]['attribs']; 
    12171220            } 
Note: See TracChangeset for help on using the changeset viewer.