|
|
@@ -2428,17 +2428,21 @@ class BiAuditPowiazania {
|
|
|
}
|
|
|
|
|
|
public function findPowiazania($ID, $progress = 0, $steps = 1, $relation = "", $weight = 0) {
|
|
|
- if (((++$this->step) % 1000000) == 0) {
|
|
|
- $progressDiff = $progress - $this->lastProgress_slowCheck;
|
|
|
- if ($progressDiff < 0.00005) {
|
|
|
- $this->lowProgressCount++;
|
|
|
- if ($this->lowProgressCount == 10) {
|
|
|
- $this->maxDepth--;
|
|
|
- self::saveToLog("Zbyt dużo rekurencji, zmniejszono maksymalną głębokość poszukiwań do {$this->maxDepth} dla bieżącego obiektu");
|
|
|
- $this->lowProgressCount = 0;
|
|
|
- }
|
|
|
- } else $this->lowProgressCount = 0;
|
|
|
- $this->lastProgress_slowCheck = $progress;
|
|
|
+ $this->step++;
|
|
|
+
|
|
|
+ if ($this->maxDepth > $this->minDepth) {
|
|
|
+ if (($this->step % 1000000) == 0) {
|
|
|
+ $progressDiff = $progress - $this->lastProgress_slowCheck;
|
|
|
+ if ($progressDiff < 0.00005) {
|
|
|
+ $this->lowProgressCount++;
|
|
|
+ if ($this->lowProgressCount == 10) {
|
|
|
+ $this->maxDepth--;
|
|
|
+ self::saveToLog("Zbyt dużo rekurencji, zmniejszono maksymalną głębokość poszukiwań do {$this->maxDepth} dla bieżącego obiektu");
|
|
|
+ $this->lowProgressCount = 0;
|
|
|
+ }
|
|
|
+ } else $this->lowProgressCount = 0;
|
|
|
+ $this->lastProgress_slowCheck = $progress;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if ((($this->step) % 100000) == 0) {
|