choojs / choojs/nanomorph

implement Meyers diffing algorithm

Open
#85 31 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
751
Forks
57
PR merge metrics
No merged PRs in 30d

Description

So we have a slight diffing problem — not only are we fairly slow at updating, reordering nodes is also suboptimal. This means that some reorders can be surprising at the worst case, and in a worst case reorders simply take longer than they should.

In computer science this is known as "diffing", and is a rather well-studied problem. Probably the best known algo for this is the Mayers Diffing algorithm. It'd be neat if we could make use of this for `nanomorph`.

### references
- https://github.com/yelouafi/petit-dom/blob/master/src/vdom.js
- https://neil.fraser.name/writing/diff/
- http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.4.6927&rep=rep1&type=pdf
- https://www.codeproject.com/Articles/42279/Investigating-Myers-diff-algorithm-Part-of

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.