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

Bad Memory Leak #72

Closed
KatieWoe opened this issue Nov 15, 2018 · 3 comments
Closed

Bad Memory Leak #72

KatieWoe opened this issue Nov 15, 2018 · 3 comments

Comments

@KatieWoe
Copy link
Contributor

For phetsims/qa#216
Start: 17.5 MB
1 min: 128 MB
2 min: 231 MB
3 min: 334 MB
4 min: 441 MB
5 min: crash before heap snapshot can finish.
Will try test on published version per request of @jbphet

@KatieWoe
Copy link
Contributor Author

With published version:
Start: 13 MB
1 min: 14.8 MB
2 min: 15.5 MB
3 min: 15.9 MB
4 min: 16.1 MB
5 min: 16.5 MB

@KatieWoe
Copy link
Contributor Author

@jbphet requested the test be done on recently published States of Matter.
Start: 27.2
1 min: 56.6
2 min: 74.9
3 min: 94.2
4 min: 119
5 min: 137

jbphet added a commit to phetsims/states-of-matter that referenced this issue Nov 16, 2018
@jbphet
Copy link
Contributor

jbphet commented Nov 16, 2018

I did a memory analysis and found the leaks. There were three nodes for which there were no dispose functions, so they have been added. Kinda a lame of me to have missed these, but it's great that QA ran this test and identified the problem.

Running a RequireJS version of Atomic Interactions, I now see the following memory heap size:

Time (minutes) Memory Usage (MB)
0 17.3
1 22.6
2 22.8
3 24.5
4 25.3
5 25.6
6 25.5
7 25.7
8 26.0
9 26.2
10 26.2

This is a pretty reasonable profile. The memory is increasing very gradually, and decreases between minutes 5 and 6, and holds steady between minutes 9 and 10. I did some comparisons between the heap snapshots, and there was nothing obvious from the sim that was leaking. If there is a slow leak, it's probably somewhere in common code, and it's not enough to cause any problems.

Bottom line: I think this is now fixed.

jbphet added a commit to phetsims/states-of-matter that referenced this issue Nov 16, 2018
@jbphet jbphet removed their assignment Dec 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants