Notion at Scale: Performance Engineering Lessons from a Rich Editor
Tech · 6 min read
Notion's challenge is rendering heterogenous content blocks while keeping interactions snappy. The product combines lazy hydration, incremental rendering, and block-level virtualization to avoid reflow costs when editing large documents. These patterns let the app maintain sub-50ms response for common edit operations.
On synchronization, Notion uses a mix of operational transforms and checkpointing to reconcile edits from multiple devices. They partition document state into chunks to reduce the blast radius of updates and to allow selective fetching of content when viewing long pages with many embeds.
Engineering tradeoffs include balancing client-side memory vs network fetch cost and designing a predictable GC model for local caches. Notion's telemetry focuses on per-block latency and real-world edit scenarios, informing decisions like prefetching frequently accessed databases and refactoring heavy embeds into asynchronous placeholders.