-
Notifications
You must be signed in to change notification settings - Fork 668
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
Huge memory consumption on dev branch #3797
Comments
Hey @orklah, can you reproduce the issue on https://psalm.dev ? |
Can you narrow this down to an individual file by running with |
I did, The file is around 1700 lines but I nothing really particular for our codebase. I tried running only this file and it fails too (with a failed allocation of 2.8G). |
Yeah, try removing stuff (methods and/or method bodies) from the file until it doesn't fail anymore |
Somehow, it's caused by a big ball of chained assignations:
When I remove this, it's ok, when it's back, the analysis takes a long time and fails with memory issue |
I reproduce with a smaller chain:
But after that, when I try to remove one of the variables, it seems to suddenly work (I tried removing 2-3 different variable to see if it was a specific variable that caused it, but it doesn't seem so) |
Reproducible on psalm.dev: https://psalm.dev/r/b909e38485 |
Oh well that's obvious, Psalm can't read French. |
Thanks! |
I just updated Psalm to the last dev version today and Psalm doesn't run anymore with the 8Gb memory it has.
The error is
PHP Fatal error: Allowed memory size of 8589934592 bytes exhausted (tried to allocate 1912606720 bytes) in C:\Users\rmorin\Documents\PhpstormProjects\vendor\vimeo\psalm\src\Psalm\Internal\Analyzer\Statements\Expression\AssertionFinder.php on line 144
This seems related to the fix for #3631
The text was updated successfully, but these errors were encountered: