Lies I was Told About Collaborative Editing, Part 2: Why we don't use Yjs
This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).
A detailed critique of Yjs and CRDTs for live collaborative text editing, arguing that prosemirror-collab is a simpler, faster, and more maintainable alternative for most use cases. Key problems identified with Yjs include: y-prosemirror destroys and recreates the entire document on every keystroke (by design), making 60fps performance targets extremely difficult; CRDTs cannot natively represent rich text, requiring expensive XML conversion; schema validation failures silently delete nodes and propagate corruption; permissions enforcement is awkward without a central authority; tombstoning either wastes memory or loses data; and CRDT bugs are nearly impossible to debug. The author demonstrates that prosemirror-collab achieves optimistic updates, offline tolerance, and fine-grained provenance in ~40 lines of code, with the only missing feature being truly masterless peer-to-peer editing.
Table of contents
Demo time: the simple solution (~40 lines of code)Challenges implementing Yjs and CRDTs… and I could go on…AppendixSort: