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

Don't calculate diffs when --no-diffs is given #3710

Merged
merged 2 commits into from Apr 29, 2023

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Apr 29, 2023

the slowest part of running rector on a file with ~5000 lines of code is generating the diff afterwards

php bin/rector.php -c rector-test.php --dry-run -vvv --debug --no-diffs

grafik

refs rectorphp/rector#7899

@staabm staabm changed the title Don't calculate diffs when --no-diffs is given Don't calculate diffs when --no-diffs is given Apr 29, 2023
@staabm
Copy link
Contributor Author

staabm commented Apr 29, 2023

do we need the same fix here?

$this->fileDiffFileDecorator->decorate($files);

when does rector use ApplicationFileProcessor?

@staabm
Copy link
Contributor Author

staabm commented Apr 29, 2023

do we need the same fix here?
when does rector use ApplicationFileProcessor?

perf wise it does not improve performance, but I added it for consistency

@samsonasik
Copy link
Member

Looks good, thank you @staabm

@samsonasik samsonasik merged commit d7a738c into rectorphp:main Apr 29, 2023
39 checks passed
@staabm staabm deleted the no-diffs branch April 29, 2023 19:39
samsonasik pushed a commit that referenced this pull request May 8, 2023
* Don't calculate diffs when --no-diffs is given

* Update ApplicationFileProcessor.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants