Overview of FFF (Fast File Finder)
mainFFF is a high-performance file search library designed for long-lived processes like IDE extensions or AI agents. Unlike CLI tools like ripgrep or fzf that fork a new process for every search, FFF keeps the index and file cache resident in memory, enabling sub-10ms queries on large repositories (e.g., 500k files).
Key Features:
- Frecency-ranked fuzzy matching: Ranks results based on access and modification frequency.
- Typo-resistant matching: Uses Smith-Waterman fuzzy scoring for both paths and content.
- Three Content Grep Modes: Plain literal (SIMD memmem), regex, and fuzzy (Smith-Waterman per line).
- Git Awareness: Returns
gitStatus(modified, staged, untracked, ignored) without shelling out to thegitCLI. - Definition Classifier: Tags lines starting with keywords like
struct,fn,class,def, andimpl. - Background Indexing: Uses a file watcher to update the index incrementally.