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 ~55ms, out of which getting response from
watchman daemon takes ~35ms, so there is room for further improvements.

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 17, 2023
1 parent d5405a8 commit c6b74b5
Show file tree
Hide file tree
Showing 6 changed files with 554 additions and 10 deletions.
Loading

0 comments on commit c6b74b5

Please sign in to comment.