This repository has been archived by the owner on Jul 26, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 59
Memory management issue - Creating and destroying a token stream 1000 times increases the memory usage with 736mb when running in HHVM cli #60
Comments
|
We do that sometimes to check how much of our dependencies are actually used, so that we can prune those that we barely touch.
Yes, that would solve the memory issue when re-scanning the same source files over and over, but not affect the case when there are for instance 1000 different source files to be scanned. |
motin
added a commit
to motin/php-token-stream
that referenced
this issue
Jun 6, 2016
motin
added a commit
to motin/php-token-stream
that referenced
this issue
Jun 6, 2016
This is not reproduced in PHP 5.6 - running the same test with 1000 executions finishes in just about 9.5mb additional memory usage! |
Looks like an HHVM issue. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I found a memory leak in phpunit's php-token-stream library used in code coverage calculations.
Using php-token-stream v1.4.8 in hhvm 3.12.0
The following test case that shows the issue (I copied Token.php into the tests/_fixture directory before running the test):
Result:
What this says is that calculating code coverage requires 700mb of memory per 1000 files as large as Token.php (around 600 lines) in the project, practically making the code coverage reports useless for larger projects or where the vendor directory is whitelisted.
The text was updated successfully, but these errors were encountered: