perf(server): reduce streaming and tool update overhead - #143
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Greptile SummaryThe server-side performance updates preserve correct user-visible behavior. Focused runtime checks confirmed that streamed assistant messages retain their accumulated text when finalized, live tool updates preserve the latest state at ordering boundaries, repository identity caching remains isolated by Git root, and ACP replay waits respect renewed activity before completing. Confidence Score: 5/5No blocking failure remains. Focused execution covered the changed streaming persistence, live-event delivery, repository identity caching, and ACP replay-idle behavior without reproducing a user-facing failure.
What T-Rex did
Reviews (5): Last reviewed commit: "Merge branch 'main' into t3code/optimize..." | Re-trigger Greptile |
Long streaming turns repeatedly rebuilt message text, queried thread state for transient provider output, and sent every live tool update to each client. Large MCP arguments could remain attached to client activity state and raise heap use.
This change appends streaming text in SQLite, skips state reads for provider events that cannot change thread state, coalesces live tool updates over a bounded 50 ms window, bounds projected tool payloads, caches Git root discovery, and replaces ACP replay polling with a deadline-based wait. Full tool payloads remain in persistence.
Focused validation:
Measured workloads:
Model: GPT-5.6 Sol
Harness: Codex in T3 Code