docs/solutions/performance-issues/2026-04-11-slate-history-typing-bursts-need-legacy-style-merge-heuristics-before-anything-else.md
The missing strict RC history lane exposed a real issue.
Current slate-history was recording contiguous typing bursts as separate undo
units unless the caller explicitly forced merging.
That made burst undo/redo pay repeated full restore cost and turned the first benchmark read into nonsense.
20 typed characters on a 5000-block document were taking about ~490ms
to undo and redo in the compare laneRestore legacy-style merge heuristics in with-history.ts:
insert_text operations on the same path mergeremove_text operations on the same path mergeAfter that fix, the same strict lane dropped from roughly ~490ms to the low
20ms range.
Typing bursts are one user intention, not twenty unrelated history moments.
If the history layer refuses to merge them, every later undo/redo benchmark is measuring batching policy failure before it measures replay cost.
Once the burst becomes one history batch again: