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
F19663513: D20836.id49677.diff
Sat, Feb 7, 10:24 AM
F19663507: D20836.id49677.diff
Sat, Feb 7, 10:24 AM
F19539079: D20836.diff
Wed, Jan 21, 5:06 PM
F19538998: D20836.diff
Wed, Jan 21, 4:50 PM
F19538670: D20836.diff
Wed, Jan 21, 4:27 PM
F19530179: D20836.id.diff
Mon, Jan 19, 9:23 PM
F19511075: D20836.id.diff
Sun, Jan 11, 9:16 PM
F19509382: D20836.id49667.diff
Sat, Jan 10, 7:01 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