Single-threaded BFS scanner is a bottleneck for large directory trees #109
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
The scanner runs in a single thread. For filesystems with millions of files in deep trees,
opendir/readdir/lstatper entry is I/O bound and cannot be parallelized.Location
src/client/scanner.c
Suggested Fix
Use multiple scanner threads each handling different subdirectories (root→queue→workers pattern). Or use
fts(3)/nftw(3)which can be faster than manual BFS with opendir/readdir/lstat.Severity
medium
Category
performance
Sub-Agent
perf-analyst (PA-4)
This issue was automatically generated by the issue-creator agent.
Fixed in PR #148 — merged into main on 2026-07-29.