-
-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] Moon commands hang when a repo has multiple projects with node_modules dir #1721
Comments
It looks like the slowdown is the glob. There's nothing about node_modules in the logs.
If we change it to
We use a 3rd party globbing library, so we don't have much control here. |
@milesj since this basically makes moon unusable with larger repos what could be done here? |
Looks like there's a probably relevant thread here: olson-sean-k/wax#51 |
@milesj I am not sure this is a performance issue but rather a configuration/misconfiguration issue in either moon, wax or walkdir. There are three problems here:
Here's an illustration: $ time find apps/*/*
find apps/*/* 0.98s user 23.13s system 45% cpu 52.589 total
$ find apps/*/* -type d
find apps/*/* -type d 0.80s user 21.56s system 47% cpu 46.765 total
$time find apps/*/* -maxdepth 1
find apps/*/* -maxdepth 1 0.00s user 0.01s system 36% cpu 0.043 total
# emulating what respect .gitignore would do
$ time find apps/*/* -prune -o -name 'node_modules'
find apps/*/* -prune -o -name 'node_modules' 0.00s user 0.00s system 60% cpu 0.006 total |
So I haven't tried it, but you can also do |
@milesj |
Describe the bug
In a repo with multiple projects and
node_modules
dir per project, moon commands become very slow.It seems that moon checks the contents of each
node_modules
dir each time.Steps to reproduce
moon :install
pnpm install
moon :install
Environment
The text was updated successfully, but these errors were encountered: