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 unbounded memory use in tests #5166

Merged
merged 2 commits into from
Aug 18, 2017
Merged

Fix unbounded memory use in tests #5166

merged 2 commits into from
Aug 18, 2017

Conversation

jfirebaugh
Copy link
Contributor

This was caused by the use of sinon's stubs. Stubs permanently record the arguments for every call, i.e. they leak memory. Don't use them unless you actually need to inspect the arguments or restore the original method.

Fixes #5163 and speeds up the render tests:

before:

real	1m59.662s
user	1m40.130s
sys	0m6.504s

after:

real	1m46.410s
user	1m25.947s
sys	0m5.938s

Stubs permanently record the arguments for every call, i.e. they leak memory. Don't use them unless you actually need to inspect the arguments.
@jfirebaugh jfirebaugh merged commit 7bdb847 into master Aug 18, 2017
@jfirebaugh jfirebaugh deleted the test-leaks branch August 18, 2017 02:05
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