-
-
Notifications
You must be signed in to change notification settings - Fork 343
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
Eliminate memory leak in logger for jest #399
Eliminate memory leak in logger for jest #399
Conversation
e4a2682
to
a904dcb
Compare
`.pipe()` call attaches events listeners to the writeable stream which in case of stdout and sequential jest tests causes memory leak as those listeners are added for every test file. Since stdout stream is special, for example it never ends while the process is runing, we can use simplified piping by listening to the `data` event of the readable stream and redirect data to stdout. This way no listeners are leaking.
a904dcb
to
8489bb0
Compare
1 similar comment
Thanks @ertrzyiks, this looks good. When I get a moment I'll have a closer look and bring it in if no issues. Much appreciated. |
Looks good to me! Thanks very much! |
Ah, I tried this out using |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Closing until somebody can pick it back up again. |
Related to #397
.pipe()
call attaches events listeners to the writeable streamwhich in case of stdout and sequential jest tests causes memory
leak as those listeners are added for every test file.
Since stdout stream is special, for example it never ends while
the process is runing, we can use simplified piping by
listening to the
data
event of the readable stream andredirect data to stdout. This way no listeners are leaking.