Skip to content

perf(launcher): optimize command list rendering#516

Closed
JustYannicc wants to merge 1 commit into
SuperCmdLabs:mainfrom
JustYannicc:codex/perf-launcher-command-list-render
Closed

perf(launcher): optimize command list rendering#516
JustYannicc wants to merge 1 commit into
SuperCmdLabs:mainfrom
JustYannicc:codex/perf-launcher-command-list-render

Conversation

@JustYannicc

Copy link
Copy Markdown
Collaborator

Summary

  • Window large launcher command lists so only the visible row range, overscan, and selected-row neighborhood render.
  • Memoize launcher row derivations for labels, icons, hotkeys, refs, and handlers with stable parent callbacks.
  • Add a focused render measurement harness plus a regression test that fails if 5,000-command scenarios render every row again.

Before / After Metrics

Measured with node scripts/measure-launcher-command-list-render.mjs --rows=5000 --iterations=5 --warmups=1.

Scenario Before row renders / median After row renders / median
root results initial 5,000 / 123.38ms 18 / 1.35ms
selection moves to middle 5,000 / 126.65ms 33 / 1.57ms
selection moves to end 5,000 / 116.01ms 26 / 1.33ms
query update same-size reshuffle 5,000 / 129.20ms 17 / 0.56ms
query update narrowed-large 3,000 / 85.45ms 28 / 1.17ms
Total scenario sequence 23,000 / 580.69ms 122 / 5.99ms

Validation

  • node --test 'scripts/test-*.mjs' passes.
  • node --test scripts/test-launcher-command-list-windowing.mjs passes.
  • node scripts/check-i18n.mjs completes; existing Italian locale misses settings.ai.whisper.vocabulary and settings.extensions.appSearchScope.
  • node /opt/homebrew/lib/node_modules/npm/bin/npm-cli.js run build:renderer passes.
  • node /opt/homebrew/lib/node_modules/npm/bin/npm-cli.js run build:main passes.
  • Codex LSP diagnostics for LauncherCommandList.tsx and LauncherCommandRow.tsx report no errors.

Notes / Risks

  • The virtualizer uses fixed row/header/calculator height estimates matching the current launcher row layout; future row-height changes should update those constants.
  • Project-wide ./node_modules/.bin/tsc -p tsconfig.renderer.json is currently blocked by unrelated existing errors outside this change.

@JustYannicc JustYannicc changed the title perf(launcher): window command list rendering perf(launcher): optimize command list rendering Jul 3, 2026
@JustYannicc

Copy link
Copy Markdown
Collaborator Author

Superseded by the consolidated renderer performance PR #533: #533. Closing this scoped source PR so review stays centralized there.

@JustYannicc JustYannicc closed this Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant