How console.log can hurt Node.js performance

👀 Eye opening fact about Node.js 👇 console.log is a hidden trap in #Node.js. While it may be sitting in your codebase looking like a innocent debug measure, it can drastically hit your app performance. Thinking why ? console.log invoked process.stdout.write under the hold which actually write to #TTY (terminal) synchronously which actually blocks the event loop. Have a look at results of load testing. 👇 While it's different in browsers due to #DevTools. Instead use pino or Winston for async logging, ditch console.log. #javascript #typescript #MERN #MEAN #express #JS #backendengineering

  • text

Not about nodejs Just about how log works same will happen in any other language with any type of log like pino/winston i/o operations takes time ,that's why larger logs can some time cause out of memory issue

To view or add a comment, sign in

Explore content categories