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: numtide#261
  • Loading branch information
Dmitry Bogatov authored and zimbatm committed Mar 13, 2024
1 parent 955ae4f commit 960284a
Show file tree
Hide file tree
Showing 6 changed files with 571 additions and 12 deletions.
Loading

0 comments on commit 960284a

Please sign in to comment.