Closed ekzobrain closed 6 months ago
DMN FEEL is context sensitive. I stressed earlier how this leads to interesting effects.
You can cache executions, but will run into trouble if the context (any input data) changes.
Interpreter class is not exported, so I cannot use it directly. May you also export it? I need to cache prepared execution trees because I need to render compatible (by structure) context multiple times...
How do you enforce an equal structure?
I use FEEL to render items (values and labels) in dynamic select form fields. So I have a FEEL expression for label
and an expression for value
.
Context is like this:
options = [
{ name: "xxx", code: "yyy", "other": "zzz" },
// repeated 100 times, for example
]
So I would like to compile expression only once for label
and for value
and then render it for all 100 options. I am sure that all options have the same structure.
I execute expressions with evaluate() in a loop with up to a thousand iterations. Usually template or epression languages have separate parse and evaluate methods, the first is needs to execute only once, and the second only evaluated already parse epression with current context (variables). Is this possible with
feelin
or does it persorm any internal AST cahing per expression?