-
-
Notifications
You must be signed in to change notification settings - Fork 947
Performance regression on array structures in 1.8.3 #7903
Copy link
Copy link
Closed
Description
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.
bin/phpstan analyse <file>.php --debug -vvv
On 1.8.1:
--- consumed 70.5 MB, total 118.5 MB, took 33.14 s
On 1.8.3:
--- consumed 72.5 MB, total 122.5 MB, took 264.10 s
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:
--- consumed 18 MB, total 46 MB, took 6.40 s
On 1.8.3:
--- consumed 28 MB, total 78 MB, took 68.58 s
Code snippet that reproduces the problem
Stripped down file:
file.php.txt
Expected output
No slowdown.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels