r/node • u/jucrouzet • Oct 07 '15
#NodeJS : A quick optimization advice
https://medium.com/@c2c/nodejs-a-quick-optimization-advice-7353b820c92e1
u/ayostaycrispy Oct 11 '15
If possible, I'd love it if someone can ELI5 why this character count limit exists in the first place.
0
Oct 07 '15
[deleted]
3
u/itsnotlupus Oct 08 '15
well, minification is always a healthy habit, as it can significantly help javascript programs running on devices with hard memory constraints. For example, if you're running a non trivial amount of javascript using jxcore on a mips device with ~32MB of RAM, that can easily be the difference between loading and not loading.
2
u/ctags Oct 08 '15
/me quietly fetches uglify.js..
Learn something new everyday!
2
u/xangelo Oct 08 '15
There are some great plugins for gulp around this. I use gulp-strip-comments first, before minification. Unless I'm doing something wrong - I've never been able to get the gulp-uglify module to strip comments.
1
u/ctags Oct 08 '15
Awesome stuff! That sounds as valid as anything to me, sometimes I wish Node had less of a free for all in structure of these things, it can get pretty confusing!
2
3
u/Fluffy8x Oct 08 '15
Reminds me of TI-Basic, where the character count itself mattered too so you'd leave out closing parentheses and not comment code at all.