Minifying front-end js files will reduce loading time by browser. However, does it make sense to minify backend node.js javascript files? Does it help to improve performance?
Asked
Active
Viewed 790 times
1 Answers
2
No - everytime you require
a module it comes from a cache so no need to minify.

Victor Parmar
- 5,719
- 6
- 33
- 36
-
Am I correct that it helps performance the first time the js file is loaded but does not help subsequent times thanks to the cache? – guagay_wk Oct 21 '16 at 14:49
-
2Yes that is correct, so unless the startup time of your application is longer than 2 seconds (which is probably only because it needs to initialize some db connection or whatever) you really don't need to optimize your code. Moreover don't forget that it's better to have the line numbers in your stack traces for debugging :) – Victor Parmar Oct 21 '16 at 14:54