duster icon indicating copy to clipboard operation
duster copied to clipboard

Duster very slow.

Open rdizio opened this issue 1 year ago • 5 comments

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.

rdizio avatar Aug 13 '24 16:08 rdizio

Thanks for the report @rdizio We'll take a look and figure out what's going on.

driftingly avatar Aug 13 '24 16:08 driftingly

@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.

driftingly avatar Sep 27 '24 17:09 driftingly

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" ] } } }

rdizio avatar Sep 27 '24 17:09 rdizio

Closed the issue by accident, my bad lol

rdizio avatar Sep 27 '24 17:09 rdizio

Can you try removing "include": [ "app", "config", "database" ], and test running the lint command?

driftingly avatar Sep 27 '24 17:09 driftingly

@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"
    ]
}

iammursal avatar Dec 04 '24 08:12 iammursal

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.

driftingly avatar Dec 06 '24 22:12 driftingly