Architecture #4782
closedArchitecture #4778: Optimize promise generation algorithm: Rudder variables lookup
Split rudder variable parsing and variable binding
Description
Today, we parse Rudder variable in Directives FOR EACH NODE. That does not make the least sense. We only need to bind them for each node, and even that is two wide: we can bind them as soon as the full context is qualified, or even remove free variable until there is no more.
So, we have to:
- create a new data structure for directive variable (Parametrized Variables ?) which allows to build the variable from a context (node infos, etc): a kind of Context => Variable type
- create a new parsing phase in the promise generation process to parse Directive parameters and extracts Rudder variables
- and it could (should ?) even be done at Directive update-time, so that we are able to give the user some feed-back on it.
- bind Parametrized Variable when their context is known