Skip to content

Instantly share code, notes, and snippets.

Last active Sep 29, 2016
What would you like to do?
In heroku dyno console functions are very costly. Thanks to Michel for helping me to identify this Prepended the following lines in app.js and it increased the speed of the app very much.
* Add this as first line to app.js speed up Heroku nodejs application
if (process.env.NODE_ENV === 'production') {
var nullfun = function () {};
console.log = nullfun; = nullfun;
console.error = nullfun;
console.warn = nullfun;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment