perf(commands): avoid rediscovery for metadata updates#571
Closed
JustYannicc wants to merge 71 commits into
Closed
perf(commands): avoid rediscovery for metadata updates#571JustYannicc wants to merge 71 commits into
JustYannicc wants to merge 71 commits into
Conversation
(cherry picked from commit fb7405f)
(cherry picked from commit 290a0f5)
(cherry picked from commit 3739cb0)
(cherry picked from commit c78d0b9)
…ated-integration-stack
…ated-integration-stack # Conflicts: # src/renderer/src/raycast-api/hooks/use-cached-promise.ts
…ated-integration-stack
…ated-integration-stack # Conflicts: # src/renderer/src/raycast-api/list-runtime-renderers.tsx # src/renderer/src/raycast-api/list-runtime.tsx
…ated-integration-stack # Conflicts: # src/renderer/src/CameraExtension.tsx
…ated-integration-stack
…ated-integration-stack # Conflicts: # src/renderer/src/raycast-api/list-runtime.tsx
…ated-integration-stack
…ated-integration-stack
… into codex/perf-consolidated-integration-stack
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
extension/command.invalidateCache()calls for inline script completion andupdate-command-metadatawith the metadata cache patch helper.Why
Runtime subtitle updates were persisted into
commandMetadataand then invalidated the whole command cache. The nextgetAvailableCommands()could therefore start full app/settings/extension/script/quick-link discovery even though only one command subtitle changed.Compatibility impact
Settings format is unchanged. Aliases, installed apps, settings panes, extensions, quick links, scripts, and structural invalidation paths keep their existing behavior. Non-inline script commands still ignore runtime subtitle metadata. Raycast
updateCommandMetadatapath-style ids now apply consistently during live cache patches and command discovery.How tested
node --test scripts/test-command-metadata-cache.mjs./node_modules/.bin/tsc -p tsconfig.main.json --noEmitsrc/main/commands.ts: no errorssrc/main/main.ts: no errorsgit diff --checkPerformance evidence
Focused harness output for 5,000 cached commands over 60 metadata updates:
structuralDiscoveryStarts=60, mediangetCommandsMs=0.115structuralDiscoveryStarts=0, mediangetCommandsMs=0.01460The harness uses a fake discovery runner so the measurement counts discovery starts deterministically without scanning the local machine.
Stack validation
Started from
codex/perf-consolidated-integration-stack/fork/codex/perf-consolidated-integration-stackat264fb89dc5c867d6c3d77bc4b95e26e235e326ea. Implementation branch iscodex/perf-command-metadata-cache, pushed toJustYannicc/SuperCmd, targetingSuperCmdLabs/SuperCmd:main. Dependency setup usedpnpm install --ignore-scripts --no-frozen-lockfile --lockfile=false; no package metadata changes were staged.Replaces
No prior PR. Replaces the subtitle-only runtime metadata paths that broadly invalidated the structural command discovery cache.