Skip to content

Conversation

@anakrish
Copy link
Collaborator

A special mode of evaluation is introduced in which

  • access to input is disallowed
  • only those builtin functions that are idempotent are allowed
  • extensions are disallowed

Those rules which evaluate to value other than undefined will procduce the same value irrespective of the input. Values of such rules are cached so that in regular evaluation these rules don't have to be evaluated.

TODO:

  • Expressions evaluating to values other than undefined can also be cached. But this might consume memory.
    • Even if one expression or statement in a query evaluated to undefined, evaluation can still proceed to evaluate other expressions so that they can be cached if possible.
  • Expensive to create objects such as Regexes can also be cached. This will require caching at a lower level than expressions. Impact on memory must also be considered.

A special mode of evaluation is introduced in which
- access to input is disallowed
- only those builtin functions that are idempotent are allowed
- extensions are disallowed

Those rules which evaluate to value other than undefined will
procduce the same value irrespective of the input.
Values of such rules are cached so that in regular evaluation
these rules don't have to be evaluated.

TODO:
- Expressions evaluating to values other than undefined can also
  be cached. But this might consume memory.
  - Even if one expression or statement in a query evaluated to
    undefined, evaluation can still proceed to evaluate other
    expressions so that they can be cached if possible.
- Expensive to create objects such as Regexes can also be cached.
  This will require caching at a lower level than expressions.
  Impact on memory must also be considered.

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant