-
-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lazy evaluation / hybrid push-pull execution model #323
base: main
Are you sure you want to change the base?
Conversation
Closes #303. |
Diverged a bit from the algorithm as written. Now, it only paints validity/invalidity, as well as storing a change time for avoiding computations for non-meaningful changes. |
New algorithm documented on Technical Fluff: https://fluff.blog/2024/04/16/monotonic-painting.html |
So I've been playing around with the bugs in this branch for a short while this evening. As best as I can tell, this branch messes up the lifetimes of something somehow - I suspect something that promises to create a new inner scope for a callback is instead returning an outer scope somewhere. Just a hunch. |
Fixed some of the major lifetime issues - after a lot of diagnosis, it turns out the issue was that New calls were being cached, which is incorrect because scope upvalues were being used in the cached functions. |
Will need to fix this |
Will also need to fix the infinite loop check in |
Something I realise now about the way that execution should work; the oldest graph objects should be evaluated first. Here's why; suppose that there's an Observer A which creates or destroys another Observer B watching the same state. This is a simple dynamic graph. First observation: every time an Second observation: intuitively, if Observer A decides to destroy B, then B should not be given the chance to evaluate. This isn't guaranteed either because eager evaluation order is not specified by https://fluff.blog/2024/07/14/glitches-in-dynamic-reactive-graphs.html |
Closes #144. Implements Reactively's hybrid push-pull algorithm for Fusion's graph objects, as described on Technical Fluff and as described by Reactively's author.