Skip to content

Commit

Permalink
[FIX] evaluation: log when reaching maximum iterations
Browse files Browse the repository at this point in the history
The evaluation of splillable function is complex and required some
bugfix over time. Some of the bugfixes have some side effects difficult
to assess and a specific one is the introduction of infinite in the
evaluation which are hidden behind a ceiling of iterations.

While infinite loops can occur in very specific cases, they are not
common and it makes sense to detect them to spot undesired behaviours.

This revision adds a log in debug mode to avoid spam to capture the
attention of the developper.

Task: 4252800
  • Loading branch information
rrahir committed Nov 14, 2024
1 parent c57d35e commit 84d917d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/plugins/ui_core_views/cell_evaluation/evaluator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,9 @@ export class Evaluator {
this.setEvaluatedCell(cell, this.computeCell(cell));
}
}
if (currentIteration >= MAX_ITERATION) {
console.debug("Maximum iteration reached while evaluating cells");
}
}

private setEvaluatedCell(positionId: PositionId, evaluatedCell: EvaluatedCell) {
Expand Down

0 comments on commit 84d917d

Please sign in to comment.