Page MenuHomePhabricator

Use a hash-and-diff strategy to produce a diff layout for block-based documents
ClosedPublic

Authored by epriestley on Sep 25 2019, 9:05 PM.
Tags
None
Referenced Files
F14748899: D20836.diff
Tue, Jan 21, 11:05 AM
Unknown Object (File)
Sat, Jan 18, 12:21 AM
Unknown Object (File)
Tue, Jan 14, 3:46 PM
Unknown Object (File)
Thu, Jan 9, 9:12 AM
Unknown Object (File)
Tue, Dec 31, 11:51 AM
Unknown Object (File)
Dec 9 2024, 3:54 PM
Unknown Object (File)
Nov 26 2024, 8:13 PM
Unknown Object (File)
Nov 22 2024, 5:24 PM
Subscribers
None

Details

Summary

Depends on D20835. Ref T13425. Ref T13414. When a document has a list of content blocks, we may not be able to diff it directly, but we can hash each block and then diff the hashes (internally "diff" also does approximately the same thing).

We could do this ourselves with slightly fewer layers of indirection, but: diff already exists; we already use it; we already have a bunch of abstractions on top of it; and it's likely much faster on large inputs than the best we can do in PHP.

Test Plan

Screen Shot 2019-09-25 at 1.57.05 PM.png (892×1 px, 149 KB)

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable