Skip to content

Separate static from dynamic dependencies. #5

@pragmatrix

Description

@pragmatrix

With the introduction of the computed! and memo! macros, it can be guaranteed that the dependencies provided are tracked with every re-evaluation of a node.

So it should be possible to separate them into "static" and "dynamic" dependencies. And because most of dependencies will be static, this can be used to optimize runtime behavior in the following ways:

  1. There is no need to dynamically track static dependencies anymore. They are stored in the Computed node at construction time only.
  2. Evaluation can be separated into a iterative and a recursive part. The iterative part makes sure that all static dependencies are up to date before executing the computation and the recursive part "forces" the dynamic dependencies to be re-evaluated. This should keep recursion depths at bay, though I am not sure how effective this is in practice.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions