Slow file, but why?
#12100
Replies: 1 comment 1 reply
-
You can try to You can run PHPStan with Blackfire (don't forget |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey there 👋
I am searching for help analysing a slow file during the PHPStan analysis. Sorry for not bringing a reproducing code in the playground 🙈
It is about this file https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Search/CriteriaArrayConverter.php
It takes ~13 seconds for PHPStan to check this. But I have no clue why this would be the case. I already tried out to comment some code, which reduces the time significantly. If those two conditions are commented out, the used time decreased by 10 seconds https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Search/CriteriaArrayConverter.php#L41-L47
On the other hand, if I only have those two, the used time is 0.01 seconds 😕
My guess is, that is has something to do with all those array types used here. But we also have this in other places. I do not see the reason why it should be problematic here 🤔
Maybe someone can shed some light here, it would be very appreciated
Thanks in advance 👋
Beta Was this translation helpful? Give feedback.
All reactions