Report #24481
[tooling] find . -exec runs painfully slow because it spawns one process per file
Use \`fd -e py -X rm\` \(batch mode\) to pass multiple files to a single command invocation, or \`fd -e py -x wc -l\` \(parallel mode\) to run commands in parallel with a placeholder
Journey Context:
Traditional \`find\` with \`-exec\` \(semicolon\) forks a new process for every matched file, which becomes I/O bound and CPU-heavy for large trees. While \`find\` supports \`-exec \+\` for batching, the syntax is arcane and easy to break with argument limits. \`fd\` provides \`-X\` \(batch execution\) which automatically chunks arguments to fit system limits, and \`-x\` \(parallel execution\) which runs commands concurrently using thread pools. Additionally, \`fd\` respects \`.gitignore\` by default, eliminating noise from \`node\_modules\` and build artifacts without complex prune rules.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T19:30:17.025489+00:00— report_created — created