Skip to content

Dedupe skip match resolution per file in RectorRunner - #8590

Closed
TomasVotruba wants to merge 1 commit into
mainfrom
tv-dedupe-skip-match
Closed

TomasVotruba wants to merge 1 commit into
mainfrom
tv-dedupe-skip-match

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Skipper::matchSkip($rector, $filePath) is node-independent - it depends only on the rule and the file, not the visited node. It was being called for every node of every rule, re-running reflection and class-skip resolution each time.

Cache the result per (file, rule) in RectorRunner, resetting the cache when a new file is processed. The clone-probe and markSkipUsed bookkeeping still run per node, so skip semantics and unused-skip reporting are unchanged.

The class drops the readonly keyword to hold the small cache; dependencies stay readonly individually.

@TomasVotruba
TomasVotruba deleted the tv-dedupe-skip-match branch October 10, 2026 13:06
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