Duster very slow.
I have php 8.3 running bare metal on my Macbook pro m3 max chip with Herd, and duster started to run slower as my project grew. I have phpstan, pint, tlint running. When I execute each command sparely, they run fast without problem. However, as soon as I execute duster, it takes a while to run each linter. Any ideas why? thanks.
Thanks for the report @rdizio We'll take a look and figure out what's going on.
@rdizio Do you have any unique configurations? duster.json, tlint.json, pint.json etc?
It might have something to do with the way we get the files to pass to the tools.
Hey @driftingly , nothing special. These are the settings I have in the duster.json file
{ "include": [ "app", "config", "database" ], "exclude": [ "vendor" ], "level": 8, "scripts": { "lint": { "phpstan": [ "./vendor/bin/phpstan", "analyse", "--memory-limit=512M" ] } }, "processTimeout": 180 }
tlint.json
{ "preset": "laravel", "disabled": [ "ArrayParametersOverViewWith", "NoDocBlocksForMigrationUpDown", "NoLeadingSlashesOnUseStatements" ], "excluded": [ "tests/" ], "paths": [ { "app": [ "app" ] } ] }
pint.json
{ "preset": "laravel", "rules": { "concat_space": { "spacing": "one" }, "blank_line_before_statement": { "statements": [ "return" ] } } }
Closed the issue by accident, my bad lol
Can you try removing "include": [ "app", "config", "database" ], and test running the lint command?
@rdizio @driftingly I was having the same issue. Can confirm removing just the "vendor" folder from "exclude" list fixes the issue
Before:
{
"include": [
"app/**",
"bootstrap/**",
"config/**",
"database/**",
"resources/views/**",
"routes/**",
"tests/**"
],
"exclude": [
"node_modules/**",
"public/**",
"resources/js/**",
"resources/css/**",
"storage/**",
"tests/fixtures",
"vendor/**"
]
}
After:
{
"include": [
"app/**",
"bootstrap/**",
"config/**",
"database/**",
"resources/views/**",
"routes/**",
"tests/**"
],
"exclude": [
"node_modules/**",
"public/**",
"resources/js/**",
"resources/css/**",
"storage/**",
"tests/fixtures"
]
}
Removing vendor from the exclude list should fix the issue. I've updated the logic around the expanded exclude to try to not include vendor in https://github.com/tighten/duster/pull/169.