Skip to content

perf(chat): avoid reparsing cumulative A2UI arguments - #1078

Merged
blove merged 1 commit into
mainfrom
blove/stage-replay-parser-performance
Sep 9, 2026
Merged

perf(chat): avoid reparsing cumulative A2UI arguments#1078
blove merged 1 commit into
mainfrom
blove/stage-replay-parser-performance

Conversation

@blove

@blove blove commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Reverse homepage replay spends excessive time reparsing cumulative A2UI tool arguments. Keep one partial parser per tool call and feed only appended characters; ignore duplicate buffers and rebuild the parser for nonappend replacements. Dispatch and malformed-input handling remain unchanged.

A deterministic regression reduces parser input from 52,212 characters to 228 for a 228-character payload delivered as cumulative prefixes with duplicates. This bounds parser input volume; full-prefix validation and materialization still require production performance verification.

Validation: regression failed before the fix; all 321 focused chat/A2UI tests and 10 homepage browser tests pass. Independent review found no important correctness issues and compared retained/fresh parser results across 259 prefixes. Chrome production traces identified the partial parser as the reverse-playback hotspot; production re-verification follows deployment.

@vercel

vercel Bot commented Sep 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
threadplane Ready Ready Preview Sep 9, 2026 1:57am UTC

Request Review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated approval: this PR received an intelligent (AI) code review. See the review comments on this PR.

@blove
blove enabled auto-merge (squash) September 9, 2026 01:54
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Claude finished @blove's task in 0s —— View job


I'll analyze this and get back to you.

@blove
blove merged commit 1b0cc5e into main Sep 9, 2026
78 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant