Custom Diffing Implementation #433
Labels
A-core
Area: Helix core improvements
C-enhancement
Category: Improvements
E-hard
Call for participation: Experience needed to fix: Hard / a lot
Currently, we depend upon
similar
to provide the diffing we need for:reload
and in the future, file comparison (#405). However, this comes with a few drawbacks: (a) it can only operate on contiguous data, and (b) it is too expensive to calculate on moderately sized, extremely different files. A big part of that is our need to temporarily convert theRope
representation of the text into aString
asRope
s are not a contiguous data structure. A histogram implementation and/or incorporating SIMD may also improve real-world performance, but it would not affect the time complexity of the algorithm which is currentlyO(n + (N+M)D)
.Our main priority should be to investigate an alternative algorithm for
:reload
that can efficiently calculate a diff without human readability in mind,rsync
, and how we can adapt these algorithms to be able to work on aRope
directly. I suspect that implementing thersync
algorithm would be the easiest one to tackle.This is a difficult solution to a difficult problem, but it would be nice to have.
The text was updated successfully, but these errors were encountered: