-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Ignore "**/node_modules" very slow, more than 40s #246
Comments
thanks @fkworld for the report can you please provide a time comparision from |
any can you please provide if this also works?
not sure if "./" works |
pretty sure i can optimize this, the issue is definitly that the filepaths will be added to the debug index in the slow way while only the directories will be added to the debug index in the fast way |
Use v2.2.3Refer to the issue description at the top. Use v2.3.0-beta.1ls-lint v2.3.0-beta.1 Slow waydebug output: (Pay attention to the time unit)
full debug file slow.txt Fast waydebug output:
full debug file fast.txt |
amazing thank you! |
Both works. |
great thanks |
My project
A pnpm workspace monorepo, 16 packages & 1000+ files.
ls-lint v2.2.3
go go1.22.1 X:nocoverageredesign
Slow way
Use ignore "**/node_modules" in
.ls-lint.yml
debug output
full debug file slow.txt
In debug file, I find that ignore files is from line 8 to line 9945, maybe it's the reason why very slow?
Fast way
Use more specific glob pattern in
.ls-lint.yml
debug output
full debug file fast.txt
In debug file, I find that ignore files is from line 8 to line 57
My thoughts
I think may be all ignore files are compared when every file lint, causing the slowness.
If this is expected, it would be best to add a usage tip to the official website.
The text was updated successfully, but these errors were encountered: