Skip to content

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

Merged
samsonasik merged 2 commits intorectorphp:mainfrom
staabm:no-diffs
Apr 29, 2023
Merged

Don't calculate diffs when --no-diffs is given#3710
samsonasik merged 2 commits intorectorphp:mainfrom
staabm:no-diffs

Conversation

@staabm
Copy link
Copy Markdown
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 requested a review from TomasVotruba as a code owner April 29, 2023 14:28
@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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

Looks good, thank you @staabm

@samsonasik samsonasik merged commit d7a738c into rectorphp:main Apr 29, 2023
@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

Development

Successfully merging this pull request may close these issues.

2 participants