Open fkworld opened 1 month ago
thanks @fkworld for the report
can you please provide a time comparision from v2.2.3
and v2.3.0-beta.1
for the slow way 🙏
any can you please provide if this also works?
- "{apps,packages}/*/.turbo"
- "{apps,packages}/*/dist"
- "{apps,packages}/*/node_modules"
- "{apps,packages}/*/README.md"
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
thanks @fkworld for the report
can you please provide a comparision from
v2.2.3
andv2.3.0-beta.1
🙏
Refer to the issue description at the top.
ls-lint v2.3.0-beta.1 go go1.22.5 X:nocoverageredesign
debug output: (Pay attention to the time unit)
-----------------------------
statistics
-----------------------------
time: 47.055022s
paths: 1125
file skips: 16
dirs: 281
dir skips: 34
=============================
full debug file slow.txt
debug output:
-----------------------------
statistics
-----------------------------
time: 44.163ms
paths: 1124
file skips: 16
dirs: 281
dir skips: 34
=============================
full debug file fast.txt
amazing thank you!
any can you please provide if this also works?
- "{apps,packages}/*/.turbo" - "{apps,packages}/*/dist" - "{apps,packages}/*/node_modules" - "{apps,packages}/*/README.md"
not sure if "./" works
Both works.
any can you please provide if this also works?
- "{apps,packages}/*/.turbo" - "{apps,packages}/*/dist" - "{apps,packages}/*/node_modules" - "{apps,packages}/*/README.md"
not sure if "./" works
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.