I'm currently thinking about "tracing" deltas through update functions in our elm-like apps again.
Basically all our collections would need to maintain two additional things. E.g. HashSet would need to new fields
Whenever Adaptify sees those things it could check if the basedOn happens to be the current state of the output and (when successful) apply the deltas to it.
After that it would need to "destroy" both fields, which could be done by replacing them in the immutable model or by mutating them under the hood.
The latter would certainly perform better but it may also cause many problems (threading, etc)
Since computeDelta uses reference-equality on subtrees (for HashMap/HashSet/etc.) this will most likely not improve the performance drastically, but we should investigate that eventually...
I'm currently thinking about "tracing" deltas through update functions in our elm-like apps again. Basically all our collections would need to maintain two additional things. E.g. HashSet would need to new fields
Whenever Adaptify sees those things it could check if the basedOn happens to be the current state of the output and (when successful) apply the deltas to it.
After that it would need to "destroy" both fields, which could be done by replacing them in the immutable model or by mutating them under the hood.
The latter would certainly perform better but it may also cause many problems (threading, etc)
Since
computeDelta
uses reference-equality on subtrees (for HashMap/HashSet/etc.) this will most likely not improve the performance drastically, but we should investigate that eventually...@haraldsteinlechner