Skip to content

ruff much slower with --fix even without lint errors #8311

@lukaspiatkowski

Description

@lukaspiatkowski

When I call ruff . it finished in 0.15s on my repo, but ruff --fix . takes >2.5s, even if there are no lint errors and nothing to fix. Is it safe to always call ruff . and run it again with --fix only when the are some fixable issues? If so then maybe there is some room for improvement in ruff itself?

My use case was that we have replaced isort (and few other tools) with ruff --fix and it is much faster, but I was looking into speeding it up even more. We run black && ruff --fix, black takes 0.8s and I hoped to speed it up with ruff format, but then noticed that ruff --fix takes most of the execution time.

Metadata

Metadata

Assignees

Labels

performancePotential performance improvement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions