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

Memory Leak #237

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

Memory Leak #237

KatieWoe opened this issue Nov 15, 2018 · 3 comments

Comments

@KatieWoe
Copy link
Contributor

Due to phetsims/atomic-interactions#72 it was decided a short memory test should be done on the recently published sim. Results:
Start: 27.2 MB
1 min: 56.6 MB
2 min: 74.9 MB
3 min: 94.2 MB
4 min: 119 MB
5 min: 137 MB

@jbphet
Copy link
Contributor

jbphet commented Nov 16, 2018

I tested a RequireJS version (1.1 release branch) with the fixes in the commit above, and the results look good. Here's a table:

Time (minutes) Memory Usage (MB)
0 30.2
1 37.5
2 39.3
3 40.3
4 40.7
5 41.0
6 41.2
7 41.4
8 41.7
9 42.0
10 42.2

The memory is increasing, but not by much, and the total is well within the expected range for a sim of this size and complexity. It's also more than a 3x reduction in memory usage at the 5 minutes mark. And, finally, I looked at several comparisons of the heap snapshots captured during the testing, and there were no leaks of SOM-specific objects. All increases in memory usage were from things like "array" and "compiled code". Here is a screenshot from a comparison of two snapshots:

image

The bottom line on this is that I think the leak is fixed, and I should do a maintenance release on it.

@jbphet
Copy link
Contributor

jbphet commented Dec 7, 2018

I should do a maintenance release on States of Matter 1.1 to publish this fix.

@jbphet
Copy link
Contributor

jbphet commented Mar 8, 2019

Redeployment complete. I tested the built version before deployment, and the memory numbers looked good (a little better than in #237 (comment) actually). Closing.

@jbphet jbphet closed this as completed Mar 8, 2019
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

2 participants