Repository navigation
Conversation
rajyan
force-pushed
the
tmp-test-regression
branch
3 times, most recently
from
November 21, 2022 10:27
beb4b41 to
89f91a2
Compare
rajyan
force-pushed
the
tmp-test-regression
branch
from
November 21, 2022 10:37
89f91a2 to
8ad2c66
Compare
Contributor
Author
|
@ondrejmirtes |
Contributor
|
if relevant, just run phpstan-src@master before and after this PR before: with this PR: -> so at least on my 12 core windows machine it seems to be pretty the same as before (or marginal faster) Edit |
Contributor
Author
|
@staabm |
Contributor
Author
Oh my god, I have no idea what I have investigated yesterday:thinking: You're right, this revert doesn't seem to fix the bottleneck. |
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.
from phpstan/phpstan#8397
I think my assumption was correct, this commit should be the cause.
cb45b58
I knew that maybe this commit cause a performance regression, but it was needed to make conditional expression invalidation work with all expressions.
The problem is, before #2007 conditionalExpression was only used for variables, so this invalidation was enough.
If conditionalExpressions is used for all expressions, we have to invalidate like how expressionTypes are invalidated.
That is, we have to invalidate conditional expression that is related to
$alikereturnsBool($a)when$ais invalidated.The failing test can show what would not work without this
phpstan-src/tests/PHPStan/Analyser/data/dependent-expression-certainty.php
Line 75 in e870778
phpstan-src/tests/PHPStan/Analyser/data/dependent-expression-certainty.php
Line 226 in e870778