Mechanism to early-exit reactivity #1743
Unanswered
fonsp
asked this question in
Pluto development
Replies: 1 comment 2 replies
-
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We now have
@use_memo
from https://github.com/JuliaPluto/PlutoHooks.jl , which allows me to memoize computations:Schermopname.2021-12-07.om.13.04.25.mov
This is great! But!
Even though the calculation of
result
is being memoized, it is still being redefined every timex
changes, triggering a reactive run. If I useresult
throughout my notebook (doing further analysis), I now need to put@use_memo
around everything that depends onresult
. This came up in my Catalyst.jl project and in #1706.To solve this, we need a mechanism for notebook code to tell Pluto to early-exit reactivity. If we do this based on
===
equality to the last value, then it resembles the runtime of systems like https://www.youtube.com/watch?v=5GGl3TojN2o and https://github.com/nextjournal/clerk . We can't simply enable this by default, because there are really cool notebooks that depend on symbolic-based triggers (like https://www.youtube.com/watch?v=6Qs5EXDpZBI).A slightly related issue is #1696 , though we can also just implement that without this generality
Beta Was this translation helpful? Give feedback.
All reactions