perf(vscode): coalesce task timeline performance optimization#11037
Merged
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (4 files)
lgtm — the animation-frame batching and right-edge pinning logic is correct. Key points verified:
Reviewed by claude-4.6-sonnet-20260217 · 247,849 tokens Review guidance: REVIEW.md from base branch |
johnnyeric
approved these changes
Jun 9, 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.
The shared Kilo chat
TaskTimelineis used across Agent Manager, sidebar chat, and editor conversations. During streamed responses it previously reacted to every appended bar by synchronously readingscrollWidthand writingscrollLeftinside Solid's reactive update chain.That read/write pair can force layout before the browser has finished applying the current DOM updates. Bursts of incoming parts can repeat the work several times before one paint. It also pulled the viewport to the newest bar while someone was scrolling through earlier activity.
Durable behavior
requestAnimationFramecallback after the current DOM updates settle.Why this target
Agent Manager was used as the realistic high-concurrency benchmark because it can stream one foreground transcript while multiple background sessions remain active. The result applies to the shared timeline component on every Kilo chat surface.
The initial 40-second profile used three concurrent sessions. Each built and exercised an isolated dependency-free Node project with bash commands, reads, writes, edits, tests, and CLI execution. The pointer remained outside the timeline, and synthetic
sessionUpdatedflooding was not used.partUpdatedmessageCreatedsessionStatuspartsUpdatedsessionUpdatedpermissionRequest/permissionResolvedThe synchronous TaskTimeline auto-scroll effect was the leading identifiable application frame. The larger
getBoundingClientRectcost was not attributed to timeline tooltips because no tooltip hover occurred during capture.Controlled result
The before/after replay ran the same 36 specified tool operations across three concurrent sessions. Both runs settled to the same relevant active-transcript inventory: 23 tool wrappers, 13 collapsibles, 12 closed tools, 1 open tool, 27 timeline bars, and 2 markdown roots.
Rendering-event volume was 319 before and 296 after. The normalized column accounts for that difference using
partUpdated,messageCreated,sessionStatus,sessionUpdated, andpartsUpdatedevents.The code comments retain the causal explanation so future timeline changes preserve the animation-frame batching and right-edge pinning behavior.