You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every performance PR must include repeated A/B timing data for the target business scenario and any materially affected user-facing scenario.
If work is deferred from startup to a later interaction, that later interaction must be measured. Bundle size alone is supporting evidence, not an accepted user-perceived performance result.
If one scenario improves while another regresses, the regression must be listed with severity. Material UX regressions require product confirmation before the PR is considered an effective optimization.
PR descriptions must list measured wins, measured regressions, test method, risk/functional impact, and unresolved data gaps.
Startup by deferring editor and root AI startup paths; first editor-heavy interactions protected by post-splash idle warmup
Current head p50: first_script_eval -577.9 ms (-49.0%), main_window_shown -598.2 ms (-45.7%), interactive_shell_ready -660.6 ms (-38.4%); first code editor -176.7 ms (-46.0%), first Git diff -127.4 ms (-32.0%) in explicit-warmup path
Latest-main strict A/B not rerun after rebase; editor warmup consumes about 230 ms idle time; users clicking before warmup finishes can still pay partial cold cost
Draft; candidate positive, but keep open for latest-main A/B decision and continued interactive_shell_ready work
Benchmark method: Windows desktop release-fast. Current PR head is 20d6a235, rebased on gcwing/main@18aa2df4. The comparison baseline remains #949's continuity baseline gcwing/main@978e079f; latest-main strict A/B was not rerun after this rebase. Startup and long-session data uses tests/e2e/specs/performance/startup-session-perf.spec.ts; editor first-open data uses tests/e2e/specs/performance/editor-first-open-perf.spec.ts. Editor timing measures app event trigger to Monaco DOM ready to isolate deferred editor/rendering cost.
The earlier first-use editor regression is now mitigated in current release-fast measurements: code-editor p50 improved from the previous PR measurement of 503.7 ms to 207.4 ms without explicit wait, and Git-diff p50 improved from 526.9 ms to 283.7 ms without explicit wait.
Background editor warmup duration p50 is about 226.7-237.0 ms across the measured editor scenarios. It is scheduled only after splash exit, uses low-priority idle scheduling, and yields between editor-surface preload stages, Monaco init, and theme sync.
The current no-wait editor measurements all had editor_startup_warmup_end before the trigger. That means the measured common path is good, but a user who clicks an editor immediately after splash exit can still see partial cold cost.
Startup splash behavior changed from immediate loading text to logo-only first. Loading workspace... appears below the logo only after 1800 ms if workspace loading is still active, so normal startup does not show a short text flash.
Current state: keep PR perf(startup): defer editor and AI initialization #971 draft until the team decides whether the existing continuity baseline is enough, or whether a fresh latest-main strict A/B run is required before marking ready.
Required Metrics For Next Startup Stage
Scenario
Required comparison
Acceptance note
Cold startup to first visible shell
Latest main vs PR, repeated Windows release-fast cold launches
Must improve or be neutral with data.
Cold startup to interactive_shell_ready
Latest main vs PR, repeated Windows release-fast cold launches
Regressions need explicit confirmation.
First open of long historical session
Latest main vs PR, long-session fixture and real local sample if available
Latest visible turns must render first; total hydrate cost must be reported.
First code editor open
Latest main vs PR, first-use timing after fresh startup
Required for any PR that defers Monaco/editor work.
First Git diff editor open
Latest main vs PR, first-use timing after fresh startup
Required for any PR that lazy-loads diff editor paths.
Feature Goal
Reduce overall desktop cold-start time and first-screen wait time without hiding existing navigation content or sacrificing feature behavior. Performance work should improve the time to a usable shell, not only move work out of one metric.
Original Problem
Cold startup currently pays for too much work before or around the first visible shell:
Startup eagerly loads systems that are not always needed before first interaction, including IDE / MCP / ACP startup probes and MiniApp catalog refresh.
Session navigation previously loaded far more session metadata than was immediately visible or clickable.
The startup path showed a black-background logo and then a white-background logo before the main UI, causing a visible flash.
Earlier measurements showed that improving isolated marks is not enough: interactive_shell_ready still needs direct follow-up work.
This issue should remain open after #934 is merged. PR #934 is the stage-1 first-screen optimization and does not complete the broader startup performance goal.
Benchmark method: Windows desktop release-fast cold launches, 10 runs per build, p50 comparison using the same packaged WebView path.
P50 metric
Baseline
Stage 1 PR
Delta
main_window_shown
1504.7 ms
1101.8 ms
-402.9 ms (-26.8%)
start_application_end
1455.7 ms
1035.6 ms
-420.1 ms (-28.9%)
startApplicationDurationMs
614.7 ms
27.7 ms
-586.9 ms (-95.5%)
afterRenderDurationMs
584.1 ms
461.4 ms
-122.7 ms (-21.0%)
Primary startup API count
15.5
7.0
-8.5 (-54.8%)
Primary startup response bytes
12,891
7,699
-5,192 (-40.3%)
Session metadata loaded
187
27
-160 (-85.6%)
Max session metadata duration
175.1 ms
53.3 ms
-121.8 ms (-69.6%)
interactive_shell_ready
1538.9 ms
1628.4 ms
+89.4 ms (+5.8%)
Additional PR #934 backend microbenchmark: paged session metadata for 1000 sessions reports about page5_avg_ms=11.550 versus full_list_avg_ms=88.142, about 7.6x faster for the paged backend path.
Show the native desktop main window earlier while keeping the frontend show path as a fallback.
Defer non-critical IDE / MCP / ACP / MiniApp startup work behind first visible shell or idle boundaries.
Page session metadata so startup fetches only initially visible rows, while explicit show-more loads the next page with loading feedback.
Keep workspace and session sections visually expanded by default instead of hiding existing navigation content to obtain the win.
Remove the extra pre-React static logo layer to avoid the double-logo flash.
Keep editor and LSP startup lazy, with a first-open loading prompt for the editor initialization path.
Remaining Follow-Up Work
Directly optimize interactive_shell_ready; this is the main remaining blocker because PR perf(startup): reduce desktop first-screen work #934 improves first-visible metrics but regresses this readiness mark by about 89 ms p50.
Profile React mount and first-shell effects to identify long tasks, synchronous store hydration, expensive render paths, and readiness gating that still run before the shell is actually usable.
Revisit startup marks so first-visible, first-interactive, and deferred-work completion are clearly separated and comparable across strict A/B runs.
Add or refine measurements for the first on-demand cost of deferred ACP / IDE / MCP / LSP work, especially editor first-open and agent flows that require language-service indexing.
Validate future stages with strict cold-start A/B data on the latest main before merging.
Constraints
Do not trade away visible functionality or default navigation behavior for startup metrics without explicit product confirmation.
Lazy loading is acceptable only when the user gets clear loading feedback for actions that can exceed about 1 second.
LSP base configuration can be prepared cheaply, but language servers and indexing should start only when the editor or an agent flow actually requires language services.
Future PRs should update this issue with the same metric table style so the trend is visible over time.
Benchmark method: Windows desktop debug preview for startup/session-list observations, plus real persistence restore-path measurements on the 5 largest local sessions by turn count. The restore benchmark compares the pre-PR full restore behavior with PR #958's tailTurnCount=3 first restore, then explicitly records that full history is still hydrated later in the background.
Global Optimization Scoreboard
Last updated: 2026-05-30
Performance PR acceptance rule:
main_window_shownp50 1504.7 ms -> 1101.8 ms, -402.9 ms (-26.8%);start_application_endp50 1455.7 ms -> 1035.6 ms, -420.1 ms (-28.9%)interactive_shell_readyp50 1538.9 ms -> 1628.4 ms, +89.4 ms (+5.8%)first_script_eval-577.9 ms (-49.0%),main_window_shown-598.2 ms (-45.7%),interactive_shell_ready-660.6 ms (-38.4%); first code editor -176.7 ms (-46.0%), first Git diff -127.4 ms (-32.0%) in explicit-warmup pathinteractive_shell_readyworkFollow-Up Metrics From PR #971
Related PR: #971
Benchmark method: Windows desktop
release-fast. Current PR head is20d6a235, rebased ongcwing/main@18aa2df4. The comparison baseline remains #949's continuity baselinegcwing/main@978e079f; latest-main strict A/B was not rerun after this rebase. Startup and long-session data usestests/e2e/specs/performance/startup-session-perf.spec.ts; editor first-open data usestests/e2e/specs/performance/editor-first-open-perf.spec.ts. Editor timing measures app event trigger to Monaco DOM ready to isolate deferred editor/rendering cost.PR #971 Business Scenario Coverage
first_script_evalmain_window_showninteractive_shell_readyinteractive_shell_readyoptimization.PR #971 Notes
editor_startup_warmup_endbefore the trigger. That means the measured common path is good, but a user who clicks an editor immediately after splash exit can still see partial cold cost.Loading workspace...appears below the logo only after 1800 ms if workspace loading is still active, so normal startup does not show a short text flash.Required Metrics For Next Startup Stage
mainvs PR, repeated Windowsrelease-fastcold launchesinteractive_shell_readymainvs PR, repeated Windowsrelease-fastcold launchesmainvs PR, long-session fixture and real local sample if availablemainvs PR, first-use timing after fresh startupmainvs PR, first-use timing after fresh startupFeature Goal
Reduce overall desktop cold-start time and first-screen wait time without hiding existing navigation content or sacrificing feature behavior. Performance work should improve the time to a usable shell, not only move work out of one metric.
Original Problem
Cold startup currently pays for too much work before or around the first visible shell:
interactive_shell_readystill needs direct follow-up work.Related Stage 1 PR
Related PR: #934
This issue should remain open after #934 is merged. PR #934 is the stage-1 first-screen optimization and does not complete the broader startup performance goal.
Stage 1 Performance Metrics From PR #934
Benchmark method: Windows desktop
release-fastcold launches, 10 runs per build, p50 comparison using the same packaged WebView path.main_window_shownstart_application_endstartApplicationDurationMsafterRenderDurationMsinteractive_shell_readyAdditional PR #934 backend microbenchmark: paged session metadata for 1000 sessions reports about
page5_avg_ms=11.550versusfull_list_avg_ms=88.142, about 7.6x faster for the paged backend path.Stage 1 Scope Already Covered By PR #934
Remaining Follow-Up Work
interactive_shell_ready; this is the main remaining blocker because PR perf(startup): reduce desktop first-screen work #934 improves first-visible metrics but regresses this readiness mark by about 89 ms p50.Constraints
Follow-Up Metrics From PR #958
Related PR: #958
Benchmark method: Windows desktop debug preview for startup/session-list observations, plus real persistence restore-path measurements on the 5 largest local sessions by turn count. The restore benchmark compares the pre-PR full restore behavior with PR #958's
tailTurnCount=3first restore, then explicitly records that full history is still hydrated later in the background.PR #958 Business Scenario Coverage
showat 944 ms after main-window create startfirst_script_evalat 9799.4 msinteractive_shell_readyat 10557 msget_opened_workspaces15.1 ms,get_recent_workspaces13.9 ms, 7list_persisted_sessions_pagecalls max 14.6 msPR #958 Historical Session Restore Measurements
tail=3)Summary:
interactive_shell_readyremains unresolved and should continue to be tracked by this issue.