Skip to content
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

Invalid memory consumption shown when using parallel processing and verbose mode #4683

Closed
janedbal opened this issue Mar 10, 2021 · 3 comments · Fixed by phpstan/phpstan-src#2027

Comments

@janedbal
Copy link
Contributor

Bug report

While running phpstan with parallel processing enabled with verbose mode, it shows invalid memory consumption.

Latest version used (0.12.81), 8 logical cores on my laptop.

Code snippet that reproduces the problem

phpstan analyse -vvv src 
Note: Using configuration file /app/phpstan.neon.dist.
Result cache not used because the cache file does not exist.
 5946/5946 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100% 2 mins/2 mins 154.5 MiB

Result cache is saved.

 [OK] No errors 

Used memory: 306.39 MB

Expected output

By checking the system memory, it really used about 6 GB. So I'd expect that number to be displayed.

@ondrejmirtes
Copy link
Member

The child processes would have to communicate that back to the master process before terminating. As this is extra work I consider this a feature request. Thanks.

@janedbal
Copy link
Contributor Author

Any plans doing this one? I think it would be great guard for RAM consumption since any developer/company using verbose mode in CI could easily detect major increases after upgrading to newer versions of PHPStan.

@github-actions
Copy link

github-actions bot commented Feb 4, 2023

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants