perf(files): speed up delete tombstone batches#566
Closed
JustYannicc wants to merge 71 commits into
Closed
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
Why
Large watcher delete batches can be mostly exact indexed file paths. The previous multi-path tombstone flow scanned every indexed entry even when all deleted paths were already known files, making delete batches much slower than watcher adds.
Compatibility impact
File-search behavior is preserved. Exact indexed file deletes are tombstoned directly, indexed directory deletes still tombstone descendants, and unknown deleted paths still tombstone indexed descendants. No feature trimming, config changes, or user-facing API changes.
How tested
node --test scripts/test-file-search-delete-batch.mjs scripts/test-file-search-perf-harness.mjs-> 7 passing tests../node_modules/.bin/tsc -p tsconfig.main.json --noEmit-> passed.src/main/file-search-index.ts-> no diagnostics found.git diff --check-> passed.Performance evidence
node scripts/file-search-perf-harness.mjs --projects 600 --modules 10 --files-per-module 10 --query-runs 2 --updates 500 --deletes 500 --limit 80-> 79,804 indexed entries, watcher-style updates 7.685ms for 500 paths, delete batch 122.856ms for 500 paths.node scripts/benchmark-file-search-delete-batch.mjs-> direct-file-batch 5.353ms for 500 paths over 80,161 entries; directory-tree-batch 8.561ms for 4,041 paths over 68,162 entries.Stack validation
Started from
264fb89dc5c867d6c3d77bc4b95e26e235e326eaoncodex/perf-consolidated-integration-stack/fork/codex/perf-consolidated-integration-stack. This branch contains one commit on top:e4d7dd7 perf(files): speed up delete tombstone batches. PR targetsSuperCmdLabs/SuperCmd:mainfromJustYannicc:codex/perf-file-search-delete-tombstones.Replaces
None.