cosmin-moldovan commented on issue #6870:
URL: https://github.com/apache/incubator-kie/issues/6870#issuecomment-7407043751
This is probably not the cause of the regression reported here, but it
points in the same
direction (context handling rather than FEEL evaluation), so it may be
useful.
On 10.2.0 we wrote DMN 1.6 models that rely heavily on boxed expressions
(context, conditional,
filter, iterator, small BKMs). Rewriting the same logic as fewer, larger
FEEL literals makes a
warm evaluation about 35 % faster (4.3 ms → 2.8 ms, identical results),
although the amount of
FEEL evaluated is the same.
A stack sampler shows roughly 40–45 % of the time in context handling
instead of FEEL:
- `DMNLiteralExpressionEvaluator.evaluate` →
`FEELImpl.newEvaluationContext(…, result.getContext().getAll())`
→ `EvaluationContextImpl.setValues`/`setValue`: every variable in scope is
copied and coerced
for every literal expression
- `EvaluationContextImpl.getAllValues`
- `DMNContextImpl.clone` on each BKM invocation
So the cost per boxed cell grows with the number of variables in scope, not
with what the cell
reads.
The `matches()` fix from #6871 works for us (5.95 ms → 4.04 ms with
`XQueryImplUtil` from 10.3.x).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]