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
Performance regression on array structures in 1.8.3 #7903
Comments
This bug report is missing a link to reproduction at phpstan.org/try. It will most likely be closed after manual review. |
Confirmed. Without further debugging or in-depth knowledge, phpstan seems to be a two-fold thing: A cpu-parallelized "scan" part, and a single-cpu "compile" part or something like that? The latter is an order of magnitude slower since 1.8.3. This is significant for a bigger codebase, easily in the range of minutes. |
PHPStan fails with composer max installation due changes in the detection. Raising the version to corresponding version leads to abnormal performance decrease. Thus not an option we can use. This change pins phpstan to a fixed version to avoid failing nightlies until the performance issue in the PHPStan tool has been fixed. See: phpstan/phpstan#7903 Used commands: > composer req --dev "phpstan/phpstan":"1.8.2" Resolves: #98253 Releases: main, 11.5 Change-Id: I38a31b87c36b9ae4c5915422dd3f09a6fca38b57 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75600 Tested-by: Oliver Klee <typo3-coding@oliverklee.de> Tested-by: core-ci <typo3@b13.com> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: Stefan Bürk <stefan@buerk.tech> Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by: Stefan Bürk <stefan@buerk.tech>
PHPStan fails with composer max installation due changes in the detection. Raising the version to corresponding version leads to abnormal performance decrease. Thus not an option we can use. This change pins phpstan to a fixed version to avoid failing nightlies until the performance issue in the PHPStan tool has been fixed. See: phpstan/phpstan#7903 Used commands: > composer req --dev "phpstan/phpstan":"1.8.2" Resolves: #98253 Releases: main, 11.5 Change-Id: I38a31b87c36b9ae4c5915422dd3f09a6fca38b57 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75601 Tested-by: core-ci <typo3@b13.com> Tested-by: Stefan Bürk <stefan@buerk.tech> Reviewed-by: Stefan Bürk <stefan@buerk.tech>
Fixed by: phpstan/phpstan-src@0cc87f3 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Bug report
(the bot closed #7902 as I removed the bug report template, sorry).
I'm running into a performance regression between 1.8.1 and 1.8.3.
This file contains a lot of array structures, and is already fairly slow on 1.8.1. On 1.8.3, the time to analyse explodes.
On 1.8.1:
On 1.8.3:
The file in question is full of business logic and references other classes, so I took the time to strip it down to something without dependencies.
Analysis of this stripped file in 1.8.3 shows a 10x slowdown compared to 1.8.1:
On 1.8.1:
On 1.8.3:
Code snippet that reproduces the problem
Stripped down file:
file.php.txt
Expected output
No slowdown.
The text was updated successfully, but these errors were encountered: