Skip to content

[perf] Decouple skipper from node run, drop clone-probe double run - #8714

Merged
TomasVotruba merged 1 commit into
mainfrom
tv-decouple-skipper-from-node-run
Oct 19, 2026
Merged

TomasVotruba merged 1 commit into
mainfrom
tv-decouple-skipper-from-node-run

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Class/path skip filtering moves into RectorRegistry::forNodeAndFile(), so a rule skipped for a file is filtered out before it ever runs.

Previously RectorRunner matched the skip and then ran refactor() a second time on a deep clone, purely to decide whether the skip had prevented a real change - an unnecessary double run of the rule on every skipped node. That clone probe is removed.

Known limit (documented on forNodeAndFile): a configured skip is now marked used as soon as its path matches the file, even if the rule would not have changed it. This drops precise unused-skip reporting in exchange for not running the rule twice.

SkipUsedTracking test updated to assert every matched skip mask is marked used.

Move class/path skip filtering into RectorRegistry::forNodeAndFile so skipped rules never run, instead of re-running refactor() on a deep clone just to decide whether a skip was used. The skip is marked used on path match.
@TomasVotruba TomasVotruba changed the title Decouple skipper from node run, drop clone-probe double run [perf] Decouple skipper from node run, drop clone-probe double run Oct 19, 2026
@TomasVotruba
TomasVotruba merged commit e655bb9 into main Oct 19, 2026
48 of 49 checks passed
@TomasVotruba
TomasVotruba deleted the tv-decouple-skipper-from-node-run branch October 19, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant