-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
lib: print to stdout/stderr directly instead of using console #27320
Conversation
This patch adds an internal function that prints to stdout or stderr by directly writing to the known file descriptor, and uses it internally in common cases to avoid the overhead of the console implementation.
From the CI:
|
If we have such significant overhead with |
@BridgeAR I don't think we could improve |
I am going to land this after the 7 day wait if no more reviews come up. |
Isn't this pretty much the same as |
@Fishrock123 It’s not exactly the same in that the output is formatted different for compatibility (primarily colors), it handles IPC, can print to stdout, and it’s not accessible in the user land - if we change any of these to process._rawDebug() I am afraid it could be a semver-major. Also the point here is to have a lighter weight console so it needs to match the console behavior which is not so raw for process._rawDebug(). |
Landed in 31b3dd2...c5817ab |
This patch adds an internal function that prints to stdout or stderr by directly writing to the known file descriptor, and uses it internally in common cases to avoid the overhead of the console implementation. PR-URL: #27320 Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #27320 Reviewed-By: James M Snell <jasnell@gmail.com>
This patch adds an internal function that prints to stdout or stderr by directly writing to the known file descriptor, and uses it internally in common cases to avoid the overhead of the console implementation. PR-URL: #27320 Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #27320 Reviewed-By: James M Snell <jasnell@gmail.com>
lib: print to stdout/stderr directly instead of using console
This patch adds an internal function that prints to stdout or
stderr by directly writing to the known file descriptor, and
uses it internally in common cases to avoid the overhead
of the console implementation.
benchmark: add benchmark for node -p
Local benchmark results
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes