Problem
After #384, streaming updates rebuild Transcript row elements and re-run react-markdown for unchanged historical replies. At main 5262158264803d4c7b260e1596c3a7ae69d91cb2, a real Transcript regression with 24 history replies and 8 live updates records 216 history parses (24 initial + 192 repeated), plus 9 live parses.
Scoped repair
Memoize only the Markdown component using its existing string prop and React's default comparison. Preserve live text changes, historical corrections, Session changes, sanitization, scrolling and component lifetime; do not add a global cache or memoize execution state.
Acceptance
The same regression should record 24 history + 9 live parses, reparse corrected text, and reparse after unmount/remount. Pass required repository and browser checks. These are deterministic invocation counts, not a wall-clock benchmark or an end-to-end speed claim.
Evidence record for this work: Web streaming Markdown investigation.
Problem
After #384, streaming updates rebuild Transcript row elements and re-run
react-markdownfor unchanged historical replies. At main5262158264803d4c7b260e1596c3a7ae69d91cb2, a real Transcript regression with 24 history replies and 8 live updates records 216 history parses (24 initial + 192 repeated), plus 9 live parses.Scoped repair
Memoize only the Markdown component using its existing string prop and React's default comparison. Preserve live text changes, historical corrections, Session changes, sanitization, scrolling and component lifetime; do not add a global cache or memoize execution state.
Acceptance
The same regression should record 24 history + 9 live parses, reparse corrected text, and reparse after unmount/remount. Pass required repository and browser checks. These are deterministic invocation counts, not a wall-clock benchmark or an end-to-end speed claim.
Evidence record for this work: Web streaming Markdown investigation.