Repository navigation
fix(editor): apply external updates to the code editor as the span that changed - #10259
Merged
Merged
Conversation
…at changed A streamed write, a Code tab refresh or a reload reached Pierre as a whole new document on every update. The agent's paced reveal updates every frame, so a 40,000-line file streamed at 28 fps with 42 main-thread stalls. The editor now applies only the span that differs (a single native comparison for an append), through Pierre's incremental edits: every size up to 40,000 lines streams at 60 fps with no stalls. Unchanged lines keep their scroll position, selection and tokens, and the update stays out of undo.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
[Medium impact] The PR appears safe to merge; no actionable issues were found. Summary
No actionable issues were established. Runtime checks were not run.
|
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #10250. External updates to the code editor (an agent streaming into a file, a Code tab refresh, a reload) reached Pierre as a whole new document each time. The file viewer reveals a stream once per frame, so the cost of every frame grew with the file:
The editor now applies only the span that differs, through Pierre's incremental
applyEdits. An append takes a single native comparison. Unchanged lines keep their scroll position, selection and tokens, and the update is still cleared from undo history. Before the editor attaches, the document item itself still carries the value.Type of Change
Testing
Browser harness running the real
CodeEditorandTextEditor:Checklist