Re:An expensive line of code: scaling Node.js on Heroku (2013)
by eyelidlessness on Thursday September 29, 2016 @12:06AM
(#12603221)
Without digging into sources, since Node is single-threaded, that drastic a performance difference for an IO-bound task would have me looking at whether logging is synchronous. Node's APIs discourage synchronous IO, but don't prevent it.
[ Parent
| on HN ]
Re:An expensive line of code: scaling Node.js on Heroku (2013)
by nprescott on Thursday September 29, 2016 @12:12AM
(#12603245)
Zeke mentions this in the comments[0] on the article:
>The console functions are synchronous when the destination is a terminal or a file (to avoid lost messages in case of premature exit) and asynchronous when itβs a pipe (to avoid blocking for long periods of time).
Which still seems to be the case in the LTS[1].
[0]: http://micheljansen.org/blog/entry/1698#comment-522124
[1]: https://nodejs.org/dist/latest-v4.x/docs/api/console.html#co...