dadhi / XamlTea

The Elm Architecture for building .NET UI applications: WPF and more
MIT License
13 stars 1 forks source link

Improve UI Diff algorithm #3

Open dadhi opened 6 years ago

dadhi commented 6 years ago

We can match keyed UI first (ignoring their positions) to get an Update patch, and then match the non-keyed rest to get Insert or Remove.

dadhi commented 6 years ago

Consider using Longest Common Sub-sequence algorithm (LCS) to children update: https://github.com/JetBrains/noria-clj/blob/master/src/java/noria/LCS.java

Steal the ideas from https://github.com/JetBrains/noria-clj, https://www.youtube.com/watch?v=5mJry0wOaOk

dadhi commented 5 years ago

Here is a good C# CLS implementation: https://github.com/praeclarum/ListDiff