Skip to content
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

Duster very slow. #156

Closed
rdizio opened this issue Aug 13, 2024 · 7 comments
Closed

Duster very slow. #156

rdizio opened this issue Aug 13, 2024 · 7 comments

Comments

@rdizio
Copy link

rdizio commented Aug 13, 2024

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.

@driftingly
Copy link
Member

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

@driftingly
Copy link
Member

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

@rdizio
Copy link
Author

rdizio commented Sep 27, 2024

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 rdizio closed this as completed Sep 27, 2024
@rdizio
Copy link
Author

rdizio commented Sep 27, 2024

Closed the issue by accident, my bad lol

@rdizio rdizio reopened this Sep 27, 2024
@driftingly
Copy link
Member

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

@iammursal
Copy link

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

@driftingly
Copy link
Member

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 #169.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants