Explore addition of a Virtual/Incremental DOM mechanism
See original GitHub issueEspecially needed to deal with mutable Seq
s. Here is an abstract for the project:
Functional reactive programming (FRP) is a popular paradigm for developing web interfaces, but care needs to be taken in the DOM binding mechanism in order to have good performance.
State of the art DOM binding libraries such as Facebook React relie on (virtual) DOM diffing mechanism to obtain best performances. On every update, a complete view of the application is generated in memory. The framework then compute a diff between current and previous view to finally apply the minimum changes to the DOM.
Another approach, called precise binding, makes use of FRP constructs to build views while maintaining a dependency graph of Rx
s, values susceptible to changes over time. This mechanism, currently using in the monadic-html
library, allows changes to be propagate very precisely to the DOM. However, depending on the granularity of mutations, idiomatic monadic-html
can be inefficient when re-rendering large portions of the DOM for small changes.
The goal of this project is to design a DOM diffing algorithm in Scala.js which could be combined with the existing precise binding mechanism to obtain an hybrid approach. Depending on time, the project would include benchmarks to compare this hybrid binding approach with existing solutions.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:6
- Comments:21 (10 by maintainers)
@OlivierBlanvillain That’s why the library name is Binding.scala 😄
I found some relevant papers which could help building a good alternative to vdom: https://github.com/raquo/Laminar/issues/14