Repository navigation
[perf] Decouple skipper from node run, drop clone-probe double run - #8714
Merged
Merged
Conversation
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.
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.
Class/path skip filtering moves into
RectorRegistry::forNodeAndFile(), so a rule skipped for a file is filtered out before it ever runs.Previously
RectorRunnermatched the skip and then ranrefactor()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.SkipUsedTrackingtest updated to assert every matched skip mask is marked used.