-
-
Notifications
You must be signed in to change notification settings - Fork 947
slow analysis on big literal array #7901
Copy link
Copy link
Closed
Labels
Description
Bug report
for some reason, we have a source file in the app which contains an array with ~90.000 literal strings.
analyzing this files takes phpstan a big amount of time:
MailAddressList.php
--- consumed 430 MB, total 766 MB, took 194.68 s
Code snippet that reproduces the problem
simplified example, which takes ~1 second to analyze:
https://phpstan.org/r/a1ac48b5-11ac-4f53-b928-2f08bc54affe
it seems my initial sample is a bit too small, because it was cut down by some tool involved.
here is a full script: https://gist.github.com/staabm/ea8b72c50c68648d48820bb7823e98b2
Expected output
faster analysis
Reactions are currently unavailable