units: The EvalEq command should not evaluate dates

The date differences evaluation is expensive, so we should avoid doing
it in `EvalEq`.

Fixes: #1092

Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
This commit is contained in:
Christophe de Dinechin 2024-07-31 20:47:06 +02:00
parent fb71fc145f
commit 0aaf12e23e

View file

@ -565,6 +565,7 @@ COMMAND_BODY(EvalEq)
{
// We will run programs, do not save stack, etc.
settings::PrepareForFunctionEvaluation willEvaluateFunctions;
save<bool> nodates(unit::nodates, true);
expression_g diff = expr->as_difference_for_solve();
if (+diff != +expr)