Skip to content

Conversation

@staabm
Copy link
Contributor

@staabm staabm commented Jan 4, 2026

this logic was executed for every expression, while we only need when !$argValue instanceof Variable || $argValue->name !== 'this'.

processArgs consumes 17% of overall runtime. lets try to not do unnecessary stuff again and again

}

if (isset($parameters) && $parametersAcceptor !== null) {
foreach ($args as $i => $arg) {
Copy link
Contributor Author

@staabm staabm Jan 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not yet understand why we iterate all args twice inside of processArgs(), but if possible, I guess we could save quite some time in case we could it do just once

@ondrejmirtes ondrejmirtes merged commit bab0aa6 into phpstan:2.1.x Jan 4, 2026
636 of 645 checks passed
@ondrejmirtes
Copy link
Member

Thank you!

@staabm staabm deleted the nsr2 branch January 4, 2026 13:18
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.

2 participants