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

test for memory leaks #170

Closed
pixelzoom opened this issue Mar 7, 2017 · 3 comments
Closed

test for memory leaks #170

pixelzoom opened this issue Mar 7, 2017 · 3 comments
Assignees

Comments

@pixelzoom
Copy link
Contributor

No description provided.

@pixelzoom pixelzoom self-assigned this Mar 7, 2017
@pixelzoom
Copy link
Contributor Author

pixelzoom commented Mar 7, 2017

Looks like the sim is leaking memory. With ?fuzzMouse, heap snapshots spaced a few minutes apart had the following sizes:

Snapshot 1: 50.1 MB
Snapshot 2: 86.1 MB
Snapshot 3: 98.0 MB
Snapshot 4: 164 MB
Snapshot 5: 231 MB
Snapshot 6: 264 MB
Snapshot 7: 330 MB

Mac OS X 10.11.6, Chrome 56.0.2924.87.

Unfortunately the summary shows that what is growing is Array, (array) and Object, so not immediately obvious what is leaking. RectangularPushButton is also leaking.

@pixelzoom
Copy link
Contributor Author

pixelzoom commented Mar 7, 2017

Majority of the leaks are plugged. Over a similar period (15 minutes) with ?fuzzMouse, here are the new heap snapshots:

Snapshot 1: 45.0 MB
Snapshot 2: 45.5 MB
Snapshot 3: 46.4 MB
Snapshot 4: 49.2 MB
Snapshot 5: 49.2 MB
Snapshot 6: 51.8 MB
Snapshot 7: 51.6 MB

... and subsequent snapshots seemed to stabilize around 53 MB.

I'll continue to look for leaks. But an 8MB increase over 15 minutes of fuzz testing is probably reasonable. Users are unlikely to exercise the simulation that much in hours of actual use.

@pixelzoom
Copy link
Contributor Author

After another 10 minutes of fuzz testing (25 minutes total), the heap size is only 55 MB. And there's nothing that appears to be growing in the Summary view. So I'm going to call this done.

Other commits that were related to fixing this:
@d18e84f9d1108ca791a7ca75b5a4186206c2e925
@e9a19816f65ec1bc475fb4010dca5d4a6b819c3f
@5f4caf94cbaa48a75fdf3fc71b749b319ef4b145
@4d6da695b1a65cec3a5297516035745350ebf33c

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

1 participant