Something went wrong. Try again.
ATProto-based AI Assistant Chat interface.
Something went wrong. Try again.
A long code block streams with about half the CPU it took. Each of its lines is a block of its own, so a character arriving lays out and paints its line alone, rather than the browser laying out and repainting the whole block, and its lines render in memoized groups of 32, so React rerenders only the last group rather than visiting every line. Each line still ends in its newline, so text selected and copied from a block keeps its blank lines. Streaming a 2,000-line block in a production build, the main thread went from 67% to 26% busy, with layout from 10 s to 1 s and paint from 15.6 s to 3.7 s.
Author Date (Oct 17, 2026, 6:28 AM UTC) Commit
Copy SHA
Parent ceed41b6 ceed41b60c484a76dcaa5129ee79e84ebe21ebc6