Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove unnecessary method-proxying calls #7959

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Apr 19, 2024

similar as #7957 this PR is trying to remove unnecessary layers of indirection, which create a huge amount of function calls (millions).

see blackfire profile before this PR:

grafik

see profile comparison before/after PR:

grafik


you can see here that a few fixers need to call

getPrevMeaningfulToken -> getMeaningfulTokenSibling -> getTOkenNotOfSibling -> getTokenNotOfKind.

each of these method calls in between are just stacking up a new function call without any other additional logic.

@staabm staabm changed the title Remove unnecessary method-proxying calls fix: Remove unnecessary method-proxying calls Apr 19, 2024
@coveralls
Copy link

Coverage Status

coverage: 96.036% (-0.02%) from 96.053%
when pulling b0e279f on staabm:simplify-tokens
into 5519faf on PHP-CS-Fixer:master.

@staabm staabm marked this pull request as ready for review April 19, 2024 12:39
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.

None yet

2 participants