refactor icon indicating copy to clipboard operation
refactor copied to clipboard

question: does refactor do multiple passes over the codebase until there's no diff?

Open cktang88 opened this issue 3 years ago • 1 comments

for example, in https://refactor.readthedocs.io/en/latest/tutorials/actions.html#replace I see 3 iterations. I'm mostly concerned about the impact this has on performance over large codebases.

cktang88 avatar Aug 26 '22 16:08 cktang88

@cktang88 that's true, it will run constantly until there is nothing to change.

I'm mostly concerned about the impact this has on performance over large codebases.

This is something that we didn't actively consider in the past with the assumption that a full-run would only happen once a new rule is introduced and then runner frameworks like pre-commit would help them to limit. But we might start allowing a single iteration examples with the addition of chained actions (#57) which would essentially help you to scan and refactor a whole tree in one go.

If you have any performance critical examples, I'd love to hear more about them.

isidentical avatar Aug 26 '22 16:08 isidentical