Last active
September 29, 2016 06:17
-
-
Save manu/6695546 to your computer and use it in GitHub Desktop.
In heroku dyno console functions are very costly. Thanks to Michel for helping me to identify this http://micheljansen.org/blog/entry/1698. Prepended the following lines in app.js and it increased the speed of the app very much.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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; | |
console.info = 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