mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 17:58:41 +00:00
Performance fixes
This commit is contained in:
parent
e3171d38e3
commit
0978f41ca2
|
|
@ -102,7 +102,8 @@ class BruteForce
|
|||
$population->addTour($tour);
|
||||
}
|
||||
|
||||
for ($i = 0; $i < count($cities); $i++) {
|
||||
$count = count($cities);
|
||||
for ($i = 0; $i < $count; $i++) {
|
||||
$extended = clone $tour;
|
||||
$extended->addCity($cities[$i]);
|
||||
unset($cities[$i]);
|
||||
|
|
|
|||
|
|
@ -106,9 +106,10 @@ class Codebar extends C128Abstract
|
|||
{
|
||||
$codeString = '';
|
||||
$length = strlen($this->content);
|
||||
$lenCodearr = count(self::$CODEARRAY);
|
||||
|
||||
for ($posX = 1; $posX <= $length; $posX++) {
|
||||
for ($posY = 0; $posY < count(self::$CODEARRAY); $posY++) {
|
||||
for ($posY = 0; $posY < $lenCodearr; $posY++) {
|
||||
if (substr($this->content, ($posX - 1), 1) == self::$CODEARRAY[$posY])
|
||||
$codeString .= self::$CODEARRAY2[$posY] . '1';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user