Ignore:
Timestamp:
12/14/12 14:30:35 (11 years ago)
Author:
douglasz
Message:

Ticket #3236 - Melhorias de performance no codigo do Expresso.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/filemanager/tp/dompdf/lib/class.pdf.php

    r3019 r7655  
    22112211    $k = substr($k, 0, 256); 
    22122212 
    2213     for  ($i = 0;$i<256;$i++) { 
     2213    for  ($i = 0;$i<256;++$i) { 
    22142214 
    22152215      $this->arc4.=  chr($i); 
     
    22182218    $j = 0; 
    22192219 
    2220     for  ($i = 0;$i<256;$i++) { 
     2220    for  ($i = 0;$i<256;++$i) { 
    22212221 
    22222222      $t =  $this->arc4[$i]; 
     
    22462246    $out = ''; 
    22472247 
    2248     for  ($i = 0;$i<$len;$i++) { 
     2248    for  ($i = 0;$i<$len;++$i) { 
    22492249 
    22502250      $a =  ($a+1) %256; 
     
    26152615                  $dtmp[$bits2[0]] = array(); 
    26162616 
    2617                   for  ($i = 1;$i<count($bits2);$i++) { 
     2617                  for  ($i = 1;$i<count($bits2);++$i) { 
    26182618 
    26192619                    $dtmp[$bits2[0]][] = $bits2[$i]; 
     
    26612661                    $dtmp[$bits2[0]] = array(); 
    26622662 
    2663                     for  ($i = 1;$i<count($bits2);$i++) { 
     2663                    for  ($i = 1;$i<count($bits2);++$i) { 
    26642664 
    26652665                      $dtmp[$bits2[0]][] = $bits2[$i]; 
     
    28492849                if  ($lastChar>0 &&  $num>$lastChar+1) { 
    28502850 
    2851                   for ($i =  $lastChar+1;$i<$num;$i++) { 
     2851                  for ($i =  $lastChar+1;$i<$num;++$i) { 
    28522852 
    28532853                    $widths[] =  0; 
     
    28792879                if (!$this->isUnicode) { 
    28802880                  // With Unicode, widths array isn't used 
    2881                   for ($i =  $lastChar + 1; $i <=  $charNum; $i++) { 
     2881                  for ($i =  $lastChar + 1; $i <=  $charNum; ++$i) { 
    28822882 
    28832883                    $widths[] =  0; 
     
    33433343    $this->objects[$this->currentContents]['c'] .=  "\n".sprintf('%.3F', $a0) .' '.sprintf('%.3F', $b0) .' m '; 
    33443344 
    3345     for  ($i = 1; $i <=  $nSeg; $i++) { 
     3345    for  ($i = 1; $i <=  $nSeg; ++$i) { 
    33463346 
    33473347      // draw this bit of the total curve 
     
    35313531    if  ($this->nStateStack) { 
    35323532 
    3533       for  ($i =  1;$i <=  $this->nStateStack;$i++) { 
     3533      for  ($i =  1;$i <=  $this->nStateStack;++$i) { 
    35343534 
    35353535        $this->saveState($i); 
     
    37153715    $numbytes = 1; // number of octetc needed to represent the UTF-8 character 
    37163716     
    3717     for ($i = 0; $i < $length; $i++) { 
     3717    for ($i = 0; $i < $length; ++$i) { 
    37183718      $c = ord($text{$i}); // get one string character at time 
    37193719      if (count($bytes) == 0) { // get starting octect 
     
    37413741          // compose UTF-8 bytes to a single unicode value 
    37423742          $c = $bytes[0]; 
    3743           for ($j = 1; $j < $numbytes; $j++) { 
     3743          for ($j = 1; $j < $numbytes; ++$j) { 
    37443744            $c += ($bytes[$j] << (($numbytes - $j - 1) * 0x06)); 
    37453745          } 
     
    38663866    if  ($text[$j] ==  '<') { 
    38673867 
    3868       $j++; 
     3868      ++$j; 
    38693869 
    38703870      switch ($text[$j]) { 
     
    38723872      case  '/': 
    38733873 
    3874         $j++; 
     3874        ++$j; 
    38753875 
    38763876        if  (mb_strlen($text) <=  $j) { 
     
    38853885        case  'i': 
    38863886 
    3887           $j++; 
     3887          ++$j; 
    38883888 
    38893889          if  ($text[$j] ==  '>') { 
     
    39053905 
    39063906          // this this might be a callback function 
    3907           $j++; 
     3907          ++$j; 
    39083908 
    39093909          $k =  mb_strpos($text, '>', $j); 
     
    39923992      case  'i': 
    39933993 
    3994         $j++; 
     3994        ++$j; 
    39953995 
    39963996        if  ($text[$j] ==  '>') { 
     
    40104010 
    40114011        // this this might be a callback function 
    4012         $j++; 
     4012        ++$j; 
    40134013 
    40144014        $k =  mb_strpos($text, '>', $j); 
     
    41584158 
    41594159    /* 
    4160      for ($i = 0;$i<$len;$i++){ 
     4160     for ($i = 0;$i<$len;++$i){ 
    41614161     $f = 1; 
    41624162     $directive = 0; //$this->PRVTcheckTextDirective($text,$i,$f); 
     
    42824282      $len =  mb_strlen($text); 
    42834283 
    4284       for  ($i =  0; $i < $len; $i++) { 
     4284      for  ($i =  0; $i < $len; ++$i) { 
    42854285        $char =  ord($text{$i}); 
    42864286        // check if we have to replace character 
     
    44024402    $tw =  $width/$size*1000; 
    44034403 
    4404     for  ($i =  0;$i<$len;$i++) { 
     4404    for  ($i =  0;$i<$len;++$i) { 
    44054405 
    44064406      $f =  1; 
     
    48504850    $ret =  0; 
    48514851 
    4852     for  ($i =  0;$i<$num;$i++) { 
     4852    for  ($i =  0;$i<$num;++$i) { 
    48534853 
    48544854      $ret =  $ret*256; 
Note: See TracChangeset for help on using the changeset viewer.