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

fix a memory leak #69

Merged
merged 1 commit into from
Jan 24, 2022
Merged

fix a memory leak #69

merged 1 commit into from
Jan 24, 2022

Conversation

claudeha
Copy link
Contributor

Memory usage of improviz would increase linearly over
time until crash from memory exhaustion.

deepseq is a bit of a sledgehammer,
probably a more precise intervention is possible.

The key change is the ... $! force newGe
which makes the data in the TVar be stored strictly.

Otherwise (conjecture) the data refers to previous
copies of the data structures, etc, which leaks
space because the whole data structure must be
retained.

Memory usage of improviz would increase linearly over
time until crash from memory exhaustion.

deepseq is a bit of a sledgehammer,
probably a more precise intervention is possible.

The key change is the ... $! force newGe
which makes the data in the TVar be stored strictly.

Otherwise (conjecture) the data refers to previous
copies of the data structures, etc, which leaks
space because the whole data structure must be
retained.
@rumblesan
Copy link
Owner

@claudeha you are a total wizard haha. just looking at this now and running my own very basic tests, and it's working beautifully. missing the deepseq dependency for the tests but I'll add that separately and just merge this now.

many thanks, this is really appreciated

@rumblesan rumblesan merged commit c1c09b2 into rumblesan:main Jan 24, 2022
@claudeha
Copy link
Contributor Author

claudeha commented Jan 24, 2022 via email

@rumblesan
Copy link
Owner

aahh, amazing! was planning to email you to ask for some info on how you did the profiling. this is gold, thankyou.

I was doing some testing today, and one of the things I realised after having had it running for half an hour was my laptop fan hadn't kicked in yet hahaha

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

2 participants