Expand description
A small line diff for rendered config files (Phase 35).
Exists once, in Rust: the CLI, the server and the app all ask for a diff instead of each carrying one, so the three cannot disagree about what changed.
Strategy: strip the common head and tail, then a longest-common-subsequence
table over what is left. Rendered configs are tens to a few thousand lines
and differ in a few places, so the middle is small. When it is not
(MAX_CELLS), the middle is reported as one deletion and one insertion
rather than spending quadratic memory; the output stays correct, only less
minimal. // ponytail: LCS table, switch to Myers O(ND) if a real config ever
hits the cell ceiling.
Enums§
Constants§
- MAX_
CELLS - Largest
n * mthe LCS table may reach (16 MB ofu32).