Skip to content

[perf] Skip reflection in RemoveUnusedPrivateMethodRector when no private method - #8579

Merged
TomasVotruba merged 2 commits into
mainfrom
perf-skip-reflection-no-private-method
Oct 10, 2026
Merged

TomasVotruba merged 2 commits into
mainfrom
perf-skip-reflection-no-private-method

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Checks the class has at least one private method before resolving class reflection in refactor().

Reflection resolution is the expensive step - classes with only public/protected methods now bail out early and never touch it.

The previous getMethods() === [] guard is now covered by the new private-method check.

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.

2 participants