Feature: Change File Search to use mfind#206
Merged
unsecretised merged 4 commits intoRustCastLabs:masterfrom Mar 22, 2026
Merged
Feature: Change File Search to use mfind#206unsecretised merged 4 commits intoRustCastLabs:masterfrom
mfind#206unsecretised merged 4 commits intoRustCastLabs:masterfrom
Conversation
unsecretised
approved these changes
Mar 22, 2026
Collaborator
Would it be possible to do this implementation now itself? |
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.
This PR changes the standard file search to use the
mfindutilty on MacOS.mfinduses the OS build Spotlight index to make searching faster, and bias results with usage and recency statistics. This implementation calls out tomfindand streams results back. Because this uses a prebuilt index, serach speeds are stable even as search scope increases. This means we can change the default search path to the entire home directory.It should be noted that this implementation should be replaced with a native call to
NSMetadataQueryor similar in the future to avoid the shell call.Below is a benchmark comparing the previous method and the
mfindmethod across~/Documents + ~/Desktop + ~/Downloadsand~, demonstrating stable speeds as scope increases: