Disclaimer : I’m totally unsure if this question is sound or not.
In the Makie - Problems with synchronous updates documentation, it is clearly stated that multiple updates of the plots can occur when only one really is needed, and that this situation can may be error-prone.
The strategy involving calling x.val = ...
instead of x[] = ...
allows to avoid this kind of situation, but first, these have to be properly detected.
So I was wondering, is there an official or at least recommended way to detect such unwanted updates ? A real like example could be
- a custom recipe
myplot
myplot
has an attributeprop1
prop1
is used to obtain an observableo1
- both
prop1
ando1
are lifted to obtain another observableo2
So far, if I understood correctly (but maybe I’m totally wrong), this should result in two updates o1
ando2
update due toprop1
updateo2
update due too1
update
If I interpreted the Observable
behavior correctly (which I’m totally unsure of), I think it would be practical to have something, probably a macro, for development purposes, that would result in the following behavior.
f,ax,p = @track_observable_updates myplot(...)
p.prop1 = 0
Updated observables :
- prop1 -> 0
|- o1 -> v1
|- o2 -> v21
- o1 -> v1
|- o2 -> v22
Is this feasible, or at least useful compared to currently available tools ?
I’m in the dark here. I’m guessing @jules @sdanisch or @ffreyer are the best suited to clarify that.