perf: reuse stale extension command builds#594
Closed
JustYannicc wants to merge 115 commits into
Closed
Conversation
…perf-wave2-integration-stack-20260704 # Conflicts: # src/renderer/src/raycast-api/hooks/use-cached-promise.ts
…perf-wave2-integration-stack-20260704 # Conflicts: # src/renderer/src/raycast-api/list-runtime-renderers.tsx # src/renderer/src/raycast-api/list-runtime.tsx
…perf-wave2-integration-stack-20260704 # Conflicts: # src/renderer/src/CameraExtension.tsx
…perf-wave2-integration-stack-20260704
…perf-wave2-integration-stack-20260704
…perf-wave2-integration-stack-20260704
…perf-wave2-integration-stack-20260704
…perf-wave2-integration-stack-20260704 # Conflicts: # src/renderer/src/raycast-api/list-runtime.tsx
…perf-wave2-integration-stack-20260704 # Conflicts: # scripts/bench-script-command-discovery.mjs # scripts/benchmark-file-search-delete-batch.mjs # scripts/lib/script-command-runner-harness.mjs # scripts/lib/ts-import.mjs # scripts/test-file-search-delete-batch.mjs # scripts/test-script-command-runner.mjs # src/main/file-search-index.ts # src/main/main.ts
…perf-wave2-integration-stack-20260704 # Conflicts: # scripts/lib/script-command-runner-harness.mjs # scripts/lib/ts-import.mjs # scripts/test-extension-lifecycle-sandbox.mjs # scripts/test-script-command-runner.mjs # src/main/main.ts # src/renderer/src/ExtensionView.tsx
…perf-wave2-integration-stack-20260704 # Conflicts: # .github/workflows/project-checks.yml # scripts/test-root-search-perf.mjs # src/renderer/src/CameraExtension.tsx # src/renderer/src/raycast-api/list-runtime.tsx
…-integration-stack-20260704
…-integration-stack-20260704
…-integration-stack-20260704
…e3-integration-stack-20260704
…erf-wave3-integration-stack-20260704 # Conflicts: # package.json # scripts/measure-extension-bundle-cache.mjs # scripts/test-icon-runtime-file-icon-cache.mjs # src/main/extension-runner.ts # src/renderer/src/components/HiddenExtensionRunners.tsx # src/renderer/src/raycast-api/icon-runtime-render.tsx
…/perf-wave3-integration-stack-20260704 # Conflicts: # scripts/test-browser-search-performance.mjs # scripts/test-root-search-perf.mjs
Collaborator
Author
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 changed
.sc-build/.sc-build-stamp.jsonsignature for extension command builds..sc-buildand rebundling every compatible command.Why
Install, update, and manual rebuild paths called
buildAllCommands()even when extension source, manifest, tsconfig, externals, and dependency-affecting inputs were unchanged. The old path invalidated caches, deleted.sc-build, and paid esbuild startup and filesystem work every time.Compatibility impact
Raycast-compatible command discovery, platform filtering, manifest externals, dependency installation/recovery, missing bare-import retry, and on-demand bundle fallback are preserved. Build stamps are additive files under
.sc-build; missing or stale stamps fall back to rebuilding. Native build scripts were not changed.How tested
node --test scripts/test-extension-runner-multi-command-build.mjs scripts/test-extension-bundle-cache.mjsSUPERCMD_EXTENSION_BUILD_MEASURE=1 node --test scripts/test-extension-runner-multi-command-build.mjsnpm run build:mainsrc/main/extension-runner.ts: no diagnosticsnpm testPerformance evidence
Before, three repeated fixture builds invoked esbuild three times for every size: 1 command
[13.65, 13.56, 12.46] ms, 5 commands[13.79, 13.61, 14.41] ms, 20 commands[16.86, 17.61, 16.73] ms.After, only the first build invokes esbuild; repeated unchanged calls reuse stamped outputs: 1 command
[13.69, 0.35, 0.20] ms, 5 commands[15.51, 0.55, 0.47] ms, 20 commands[18.82, 1.45, 1.57] ms. Esbuild calls dropped from 3 to 1 across each three-call fixture run.Stack validation
Started from
codex/perf-wave3-integration-stack-20260704at206eab8280a2eb91a57e4e74ea6df99e45a55cb4; branch iscodex/perf-wave4-stale-extension-buildswith commit925b2d8. Readdocs/extension-install-flow.mdbefore changing extension build behavior. Full finalnpm test: 321 tests, 318 pass, 3 skipped.Replaces
None.