mayu-live / framework

Mayu is a live updating server-side component-based VDOM rendering framework written in Ruby
https://mayu.live
GNU Affero General Public License v3.0
139 stars 4 forks source link

Optimize the VDOM diffing algorithm #41

Closed aalin closed 1 year ago

aalin commented 2 years ago

I have made several attempts at implementing the same child diffing algorithm as in preact, snabbdom and read the code for several other VDOM implementations.

I think I got close once but there were some subtle ordering issues. When reordering children, the order of children would end up different in the DOM then in the VDOM sometimes. So instead I made the simplest thing I could think of that would work, however, it's not very efficient.

It would be pretty awesome to get that two way diff algorithm working.

aalin commented 1 year ago

Fixed by #53