Skip to content

perf(file-search): speed up path-like queries#508

Closed
JustYannicc wants to merge 1 commit into
SuperCmdLabs:mainfrom
JustYannicc:codex/perf-file-search-path-query
Closed

perf(file-search): speed up path-like queries#508
JustYannicc wants to merge 1 commit into
SuperCmdLabs:mainfrom
JustYannicc:codex/perf-file-search-path-query

Conversation

@JustYannicc

Copy link
Copy Markdown
Collaborator

Summary

  • Cache normalized tilde paths in the file-search index entries so path-like scans stop recomputing them per query.
  • Use existing prefix buckets to choose the most selective safe path-token candidate set before exact path filtering.
  • Add temp-directory correctness coverage plus an opt-in large synthetic performance harness for path-like queries.

Metrics

Harness: SUPERCMD_FILE_SEARCH_PERF=1 node scripts/test-file-search-index.mjs on a 61,201-entry synthetic temp-home index with 360 path-like queries.

  • Before: 15,580.41 ms total, 43.279 ms/query.
  • After: 17.89 ms total, 0.050 ms/query.

Validation

  • node scripts/test-file-search-index.mjs
  • SUPERCMD_FILE_SEARCH_PERF=1 node scripts/test-file-search-index.mjs
  • /opt/homebrew/Cellar/node@22/22.22.3/bin/npm test
  • /opt/homebrew/Cellar/node@22/22.22.3/bin/npm run build:main
  • /opt/homebrew/Cellar/node@22/22.22.3/bin/npm run check:i18n
  • /opt/homebrew/Cellar/node@22/22.22.3/bin/npm run build:renderer
  • Codex LSP diagnostics: src/main errors = 0

Notes

  • check:i18n exits 0 and still reports existing missing Italian keys: settings.ai.whisper.vocabulary, settings.extensions.appSearchScope.
  • build:renderer emits existing Vite CJS and stale Browserslist warnings.
  • Direct push to origin was denied, so this PR uses the JustYannicc fork head branch.

@JustYannicc JustYannicc changed the title [codex] Speed up path-like file search queries perf(files): speed up path-like search queries Jul 3, 2026
@JustYannicc JustYannicc changed the title perf(files): speed up path-like search queries perf(file-search): speed up path-like queries Jul 3, 2026
@JustYannicc

Copy link
Copy Markdown
Collaborator Author

Superseded by the consolidated upstream PR #535: #535

@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