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

Pool.php - add methods to clear finished/results cache (#235) #237

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

iasjennen
Copy link

Since the member variables of finished/results keep growing indefinitely over time this is a source of a memory leak. This memory leak is resolvable by clearing the result caches with the newly introduced methods.

Since the member variables of finished/results keep growing indefinitely over time this is a source of a memory leak.
This memory leak is resolvable by clearing the result caches with the newly introduced methods.
@Nielsvanpach
Copy link
Member

Could you add tests to ensure this works?

@iasjennen
Copy link
Author

@Nielsvanpach Please find the test now attached.
This test also checks for memory consumption before and after result clearing. Please note the memory_get_usage() may be a bit fuzzy to interpret and i am not sure whether the pool is still memory leaking at all after the clearing.
Anyway the saving seems to be at least in the range of an order of magnitude.

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.

2 participants