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

Reduce memory usage for Coverage Data #708

Merged
merged 6 commits into from Jun 20, 2019
Merged

Conversation

maks-rafalko
Copy link
Member

@maks-rafalko maks-rafalko commented Jun 18, 2019

This PR:

  • Reduces memory usage when Coverage Data is being collected
  • Covered by tests

Partially fixes issues from #705. At least I now able to run Infection for Psalm locally with memory_limit=12G :D

@sanmai
Copy link
Member

sanmai commented Jun 19, 2019

PHP is very liberal with copying a whole array if you happen to change a single value, or if you wish to pass it around from function to function.

One way is to use references, but that's very troublesome and requires a great care. Another way is to wrap a big array with an object, and access this object's property instead.

@maks-rafalko
Copy link
Member Author

Another way is to wrap a big array with an object, and access this object's property instead.

done in #710

Thank you @theofidry & @sanmai

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants