Repository navigation
perf(vscode): cut session switch and send latency in chat transcript - #14237
Merged
marius-kilocode merged 2 commits intoSep 17, 2026
Merged
Conversation
Batch the optimistic user message with submission state so Send does not render an intermediate transcript, and reuse a mounted row's DOM when it moves between the direct tail and the virtualizer. Skip the forced scrollHeight read and the mention/model catalog scan for empty drafts.
Contributor
Code Review SummaryStatus: 3 Issues Found | Recommendation: Merge (non-blocking suggestions) Overview
No correctness or behavioral regressions were found in the changed production code. The Issue Details (click to expand)SUGGESTION
Files Reviewed (11 files)
Fix these issues in Kilo Cloud Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
eshurakov
approved these changes
Sep 17, 2026
marius-kilocode
deleted the
profile-session-switch-performance-regression-vsco
branch
September 17, 2026 12:37
This was referenced Sep 18, 2026
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.
What Problem This Solves
Switching between sessions in Agent Manager and sending a prompt both pause the transcript. The pause is most visible when the previous turn has many tool calls and the transcript is scrolled to the bottom.
Why This Change Was Made
Profiling the isolated VS Code extension with a real session history (201 messages, 209 tool calls, all tool and reasoning blocks collapsed) showed the cost before the provider is even contacted:
scrollHeight, forcing layout even when the draft was empty, and rebuilt a model-key set while scanning an empty draft.This change keeps the whole live turn rendered directly, which is what prevents flicker during streaming, and instead reuses the already mounted row across the direct and virtual owners. The row keeps its DOM and component instance, so the handoff no longer re-creates it. The optimistic message and submission state now update in one batch. Empty drafts skip the layout read and the mention and model-catalog scans, while non-empty autosize behavior is unchanged.
User Impact
Evidence
Isolated VS Code self-test, real session history imported read-only, tools collapsed, reasoning set to Headline.
Flicker checks after the change:
Checks:
bun run compile(host and webview typecheck, lint, bundle), focused transcript, scroll, prompt, and mention unit tests,check-kilocode-change, andknip.Limitations
The switching improvement is small and within sample noise, and the profile only confirms that the
solid-presenceanimation-name hot path left the top list. No build of the previous revision was compared, so the historical regression size is not proven. The absolute Send baseline differs between sessions, so the Send percentages are relative to this fixture.