Files
t3code/apps/server/src
Theo BrowneandLucas Valbuena c2283ce146 perf: make streaming projection and activity appends incremental (#9152)
Takes over #6608 by @x1xhlol.

Server: thread.message-sent updates the projection row directly and folds latestUserMessageAt in as a running maximum instead of running refreshThreadShellSummary. Client: thread.activity-appended takes an O(1) append path for in-order, unseen activities on reducer-produced arrays, with a WeakMap id index, and falls back to filter and sort for out-of-order, re-delivered, context-window, and snapshot-loaded cases.

Reducer benchmark: 10,000 in-order appends went from 1,180 ms to 70 ms.

Change authored by Claude Fable 5.1 running in Claude Code, based on work by @x1xhlol.

Co-authored-by: Lucas Valbuena <[email protected]>
2026-09-01 18:07:26 -07:00
..
…
…
…
…
…
…
…
…
…
…