Skip to content

Commit

Permalink
feat: Add support for using watchman(1) instead of walking filesystem
Browse files Browse the repository at this point in the history
Anecodically, for project having 4k files and 7 different formatters,
this change can reduce time it takes for treefmt(1) to figure out that
it has nothing to do from ~350ms down to ~8m.

If "WATCHMAN_SOCK" environment variable is not set and "watchman(1)"
command are not available, "treefmt" transparently falls back on walking
the file system. Setting the environment variable is highly recommended,
since is avoids subprocess invocation.

Ref: #261
  • Loading branch information
Dmitry Bogatov committed Dec 22, 2023
1 parent d5405a8 commit 8f39c99
Show file tree
Hide file tree
Showing 6 changed files with 571 additions and 12 deletions.
Loading

0 comments on commit 8f39c99

Please sign in to comment.