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
Feature goal: reduce desktop cold-start, first visible shell, and interactive_shell_ready time without hiding existing navigation/session content or sacrificing existing behavior. Optimization is judged by end-to-end user scenarios, not isolated code movement.
Current headline:
The issue remains open. The latest strict release-fast A/B data shows interactive_shell_ready is now measurably lower in perf(startup): add tracing and reduce shell latency #1015, but post-interactive startup pressure and first-interaction consistency still need follow-up.
The most important current bottleneck signal is frontend/bridge queue pressure, not backend command body time. New trace data from perf(startup): add tracing and reduce shell latency #1015 shows pre-interactive command body time around 3.0 ms p50, while estimated bridge/queue wait is around 521.1 ms p50.
Long historical session behavior remains latest-content-first with 3 / 80 turns initially loaded in the generated fixture. Comparable restore/hydrate metrics are neutral to positive, while full background hydrate has a small +2.2 ms p50 regression that should remain tracked.
Global Optimization Scoreboard
Performance PR acceptance rule:
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
Pre-merge 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 was not rerun before merge; editor warmup consumes about 230 ms idle time; users clicking before warmup finishes can still pay partial cold cost
Merged; issue stayed open for post-merge main baseline and continued interactive_shell_ready work
Latest-main strict release-fast cold startup plus generated long-session first open
Current main@2a016364 -> #1015 p50: first_script_eval 632.4 -> 545.6 ms (-13.7%); main_window_shown 740.0 -> 593.4 ms (-19.8%); interactive_shell_ready 1138.7 -> 778.4 ms (-31.6%); non_critical_init_done 1421.2 -> 1296.3 ms (-8.8%)
Long-session fullHydrateDuration p50 33.8 -> 36.0 ms, +2.2 ms (+6.5%); AppLayout is now a lazy chunk; remaining bridge/import pressure is still visible
Open; acceptable based on latest A/B if CI stays green, but issue remains open for the next PR scopes below
Latest Comparable Snapshot
Method: Windows desktop release-fast, 5 cold launches each. Baseline is gcwing/main@2a016364; latest measured head is #101585225a72.
Scenario
Metric
Main p50
Latest head p50
Delta
Cold startup
first_script_eval
632.4 ms
545.6 ms
-86.8 ms (-13.7%)
Cold startup
main_window_shown
740.0 ms
593.4 ms
-146.6 ms (-19.8%)
Cold startup
interactive_shell_ready
1138.7 ms
778.4 ms
-360.3 ms (-31.6%)
Cold startup
non_critical_init_done
1421.2 ms
1296.3 ms
-124.9 ms (-8.8%)
Long session first open
restoreDuration
53.8 ms
47.6 ms
-6.2 ms (-11.5%)
Long session first open
hydrateDuration
123.6 ms
109.8 ms
-13.8 ms (-11.2%)
Long session first open
latestFrameSinceHydrate
43.2 ms
42.5 ms
-0.7 ms (-1.6%)
Long session background hydrate
fullHydrateDuration
33.8 ms
36.0 ms
+2.2 ms (+6.5%)
Global Conclusions
Earlier attempts failed to move end-to-end startup when they optimized narrow local slices or moved work without measuring the receiving stage. The current tracking rule is therefore end-to-end first, with local slices used only to explain the result.
Backend command body time is currently not the primary pre-interactive blocker. The latest trace points to frontend module graph, command scheduling, and WebView bridge/queue pressure as the higher-leverage targets.
Startup and session work should not be optimized by hiding product content. Existing visible workspace/session navigation must remain available unless an explicit product decision says otherwise.
Long-session first-open needs a stricter user-perceived target: latest visible content should appear as close to 100 ms as possible, while full history hydration can continue in the background with clear safeguards.
Remaining PR-Sized Work
Scope
Goal
Required data before merge
Decision / risk
PR-A: post-interactive session metadata pressure
Coalesce/dedupe initial list_persisted_sessions_page, load only visible/expanded metadata, and add loading feedback for explicit show-more
Startup + first show-more timing; session list correctness; command count before/after
Must not hide currently clickable sessions or make show-more feel stalled
PR-B: git/workspace status batching
Batch/cache git_is_repository, git_get_repository_basic, and workspace status probes per workspace path
Startup and post-interactive command breakdown; workspace switch timing
Remote workspace behavior must be preserved; remote deferral needs explicit confirmation
PR-C: bootstrap config/keybinding path
Replace repeated early get_config calls with typed bootstrap/cache where safe; keep global shortcuts correct
Startup A/B plus settings/keybinding first-use timing
app.keybindings should not be deferred blindly because it affects global UX
PR-D: frontend bundle/import graph cleanup
Resolve static/dynamic import conflicts for FlowChatManager/state machine, ConfigManager, MCP/ACP, context menu, and terminal/editor surfaces
Root chunk size plus startup E2E; first-use timings for moved surfaces
Moving modules without first-use data is not sufficient
PR-E: long-session latest-frame target
Reduce generated long-session clickToLatestFrame toward <=100 ms via render scheduling/viewport-priority hydration
Long-session fixture and at least one real large-session sample, latest frame and full hydrate
Full hydrate can be deferred, but scroll/search/history behavior must remain correct
PR-F: native/WebView startup slice
Investigate webviewBuildDuration and the 150 ms show wait without reintroducing splash flicker or black/white logo transitions
Video/screenshot sanity plus release-fast startup A/B
Any flicker risk requires product confirmation before changing show timing
PR-G: measurement harness hardening
Make strict A/B report generation easier and avoid noisy production logs
Harness output and CI/local command documentation
Measurement-only PRs should not claim product performance wins
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.
Benchmark method: Windows desktop release-fast. PR #971 was merged on 2026-05-30 as merge commit 065cd8db; the measured pre-merge head was 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 before merge. 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: PR perf(startup): defer editor and AI initialization #971 is merged. The next stage must use post-merge main as the new baseline and keep this issue open for interactive_shell_ready analysis and residual-risk validation.
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.
Current Global Status
Last updated: 2026-06-01
Feature goal: reduce desktop cold-start, first visible shell, and
interactive_shell_readytime without hiding existing navigation/session content or sacrificing existing behavior. Optimization is judged by end-to-end user scenarios, not isolated code movement.Current headline:
interactive_shell_readyis now measurably lower in perf(startup): add tracing and reduce shell latency #1015, but post-interactive startup pressure and first-interaction consistency still need follow-up.3.0 msp50, while estimated bridge/queue wait is around521.1 msp50.Global Optimization Scoreboard
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_readyworkmain@2a016364-> #1015 p50:first_script_eval632.4 -> 545.6 ms (-13.7%);main_window_shown740.0 -> 593.4 ms (-19.8%);interactive_shell_ready1138.7 -> 778.4 ms (-31.6%);non_critical_init_done1421.2 -> 1296.3 ms (-8.8%)fullHydrateDurationp50 33.8 -> 36.0 ms, +2.2 ms (+6.5%); AppLayout is now a lazy chunk; remaining bridge/import pressure is still visibleLatest Comparable Snapshot
Method: Windows desktop
release-fast, 5 cold launches each. Baseline isgcwing/main@2a016364; latest measured head is #101585225a72.first_script_evalmain_window_showninteractive_shell_readynon_critical_init_donerestoreDurationhydrateDurationlatestFrameSinceHydratefullHydrateDurationGlobal Conclusions
Remaining PR-Sized Work
list_persisted_sessions_page, load only visible/expanded metadata, and add loading feedback for explicit show-moregit_is_repository,git_get_repository_basic, and workspace status probes per workspace pathget_configcalls with typed bootstrap/cache where safe; keep global shortcuts correctapp.keybindingsshould not be deferred blindly because it affects global UXclickToLatestFrametoward <=100 ms via render scheduling/viewport-priority hydrationwebviewBuildDurationand the 150 ms show wait without reintroducing splash flicker or black/white logo transitionsRequired 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 startupFollow-Up Metrics From PR #971
Related PR: #971
Benchmark method: Windows desktop
release-fast. PR #971 was merged on 2026-05-30 as merge commit065cd8db; the measured pre-merge head was20d6a235, rebased ongcwing/main@18aa2df4. The comparison baseline remains #949's continuity baselinegcwing/main@978e079f; latest-main strict A/B was not rerun before merge. 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.mainas the new baseline and keep this issue open forinteractive_shell_readyanalysis and residual-risk validation.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.