[GH-ISSUE #240] file search optimize #123

Closed
opened 2026-04-08 16:50:31 +03:00 by zhus · 1 comment
Owner

Originally created by @image72 on GitHub (Jul 3, 2023).
Original GitHub issue: https://github.com/sigoden/dufs/issues/240

Specific Demand

file search too slow

Implement Suggestion

use tantivy speed up file search. rust friendly.
demo integration
orange. Cross-platform local file search engine

Originally created by @image72 on GitHub (Jul 3, 2023). Original GitHub issue: https://github.com/sigoden/dufs/issues/240 ## Specific Demand file search too slow ## Implement Suggestion use [tantivy](https://github.com/quickwit-oss/tantivy) speed up file search. rust friendly. demo integration [orange. Cross-platform local file search engine](https://github.com/naaive/orange)
zhus closed this issue 2026-04-08 16:50:31 +03:00
Author
Owner

@sigoden commented on GitHub (Jul 4, 2023):

First of all thanks for your suggestion.

After oange starts, it will walk the directory, collect metadata of all files in the directory, then store them into the tantivy full-text index database. At the same time, orange also starts watcher to monitor file system changes and synchronize the database.

The search of dufs is not a high-frequency requirement. Optimizing search following your suggestion will cause slow startup or unavailable search at launch (It takes time to walk file system to build index). If the index is saved to a file, it violates the stateless promise of dufs. If it is saved to memory, it consumes more memory. Watch file system also consumes resources. And dufs also supports symlink, if someone accidentally links the C drive, I don't know what will happen.

so i'm not going to take your suggestion.

<!-- gh-comment-id:1619326277 --> @sigoden commented on GitHub (Jul 4, 2023): First of all thanks for your suggestion. After oange starts, it will walk the directory, collect metadata of all files in the directory, then store them into the tantivy full-text index database. At the same time, orange also starts watcher to monitor file system changes and synchronize the database. The search of dufs is not a high-frequency requirement. Optimizing search following your suggestion will cause slow startup or unavailable search at launch (It takes time to walk file system to build index). If the index is saved to a file, it violates the stateless promise of dufs. If it is saved to memory, it consumes more memory. Watch file system also consumes resources. And dufs also supports symlink, if someone accidentally links the C drive, I don't know what will happen. so i'm not going to take your suggestion.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#123