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

Avoid triggering stdio streams creation #101

Merged
merged 1 commit into from Aug 21, 2019

Conversation

stroncium
Copy link
Contributor

Use tty instead of stdio streams to detect if stdio outputs are ttys to improve require speed.

tty is used by stdio streams, so if streams are initialized later or were initialized before there will be no overhead. However if streams are not used(process.stdout and process.stderr stream objects, not OS streams itself), it speeds up require times slightly.

@Qix-
Copy link
Member

Qix- commented Jul 22, 2019

This breaks API and encumbers the ability to pass arbitrary streams for evaluation. I'm pretty against this as-is.

Is there a way to achieve this otherwise?

@stroncium
Copy link
Contributor Author

@Qix- It is supposed to be internal only fix, without any changes to API. Am I missing something there?

@Qix-
Copy link
Member

Qix- commented Jul 22, 2019

Nvm I see now. LGTM.

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.

None yet

3 participants