Skip to content

Conversation

@TomasVotruba
Copy link
Member

No description provided.

@TomasVotruba TomasVotruba force-pushed the tv-less-traverse-stop branch from b93e507 to dd7c4bf Compare December 1, 2025 22:48
@samsonasik
Copy link
Member

I am not sure about this, this may cause issue on performance, since it adds new "preload" attribute whether used or not, and people tend to use big data on property/constant.

The previous implementation will only set below node on specific rule, now this set attribute on any rule.

@TomasVotruba
Copy link
Member Author

I'll give it a test run for performance, but I think we'll be safe.
Goal is to remove all int return types from refactor() as that give us extra complexity in AbstractRector

@TomasVotruba TomasVotruba merged commit 3f60b07 into main Dec 1, 2025
55 checks passed
@TomasVotruba TomasVotruba deleted the tv-less-traverse-stop branch December 1, 2025 23:32
@TomasVotruba
Copy link
Member Author

Seems no diff at all. Mind the NodeVisitor::DONT_TRAVERSE_* triggers node traverser on all nodes + its children as well. Goal of this is to remove it and re-use attribute-flags instead. Those can be shared as well 👍

before

387.88s user 7.07s system 1778% cpu 22.207 total
351.04s user 6.39s system 1735% cpu 20.598 total

after

376.07s user 6.51s system 1716% cpu 22.291 total
361.87s user 6.76s system 1697% cpu 21.714 total
343.33s user 6.33s system 1644% cpu 21.268 total

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.

3 participants