[experiment] Remove leaveNode() method on AbstractRector and CallableNodeVisitor#7767
Merged
TomasVotruba merged 1 commit intomainfrom Dec 25, 2025
Merged
[experiment] Remove leaveNode() method on AbstractRector and CallableNodeVisitor#7767TomasVotruba merged 1 commit intomainfrom
TomasVotruba merged 1 commit intomainfrom
Conversation
Member
Author
|
All checks have passed 🎉 @TomasVotruba it is ready for review. |
Member
|
I've always wanted to remove this mess. Thank you 🙏 Could you test on some old version of a project, where dead-code set removes lot of code? I wonder what performance is before/after. Some code has to be removed by the dead-code set, so we can see this part being used. |
Member
Author
|
I tested in our project with 5617 files with 101 files changed: Before: 1 minutes 52 seconds ➜ ../rector-src/bin/rector process --clear-cache
[OK] 101 files have been changed by Rector
../rector-src/bin/rector process --clear-cache 1043.92s user 32.09s system 953% cpu 1:52.80 totalAfter: 1 minutes 50 seconds ➜ ../rector-src/bin/rector process --clear-cache
[OK] 101 files have been changed by Rector
../rector-src/bin/rector process --clear-cache 1037.09s user 32.84s system 968% cpu 1:50.45 totalThe different seems not really noticable as only 2 seconds, it just clean up if possible. |
Member
|
Looks nice and clear. Lets give it a go then 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It seems the
leaveNodeseems no longer needed on bothAbstractRectorandCallableNodeVisitor, also its save nodes to returns and node id to remove properties.This PR to remove it to both classes.