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
clear-result-cache
runs into out-of-memory when including big baseline
#6432
Comments
Hi, how big is your baseline file? I've never seen Neon to consume so much memory! I've added the option: phpstan/phpstan-src@156700b |
9.5mb 🙈
Thank you very much! 🙏 |
@mw-jko could you create a blackfire or similar profile so we can see where all the memory is consumed with such a big baseline? Maybe there is some low hanging fruit to optimize for memory in this case... |
@staabm (I made the "business" github account my personal one, thus the handle change) I will try, have no experience with blackfire (or services like this) so far. But what I wonder is, why the After getting some insight into the source code while fiddling around with the other issue this weekend my guess is, it's because of the centralized Just not sure if it is important enough to change or how easy to change this part is. |
I don’t think it’s worth changing it. You’ll load the baseline often anyway, so it doesn’t matter you need to wait when clearing the result cache. Which shouldn’t be normally needed anyway - if you find the need to clear it often, that’s likely a bug to be opened about that. |
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
Running PHPStan 1.4.2 (also occured on 1.3.3, but upgraded to check if it maybe is already fixed):
Running PHPStan through
vendor/bin/phpstan clear-result-cache -c phpstan.neon
runs into memory problems, whenphpstan.neon
includes a big baseline.Code snippet that reproduces the problem
Expected output
I run
analyse
with--memory-limit
so it's not an issue there, butclear-result-cache
does not support this parameter.I don't understand why it's relevant to load the baseline, when I just want to clear the result cache? No matter how big the base line is - result cache should be cleared. Only relevant setting processed should be the
tmpDir
configuration.A workaround could be supporting
--memory-limit
forclear-result-cache
as well?The text was updated successfully, but these errors were encountered: