3 ms·
Minifying code for browsers greatly reduces the amount of bandwidth needed to serve web traffic. There's a good reason it's done. By your logic, there's actua
by midoridensha 3y ago
Minifying code for browsers greatly reduces the amount of bandwidth needed to serve web traffic. There's a good reason it's done.
By your logic, there's actually no reason to use compiled code at all, for almost anything above the kernel. We can just use Python to do everything, including run browsers, play video games, etc. Sure, it'll be dog-slow, but you seem to care more about reading the code than performance or any other consideration.
- Dalewyn 3y agoI already alluded[1] to the incentives for the host to minify their JavaShit, et al., and you would have a point if it wasn't for the fact that performance otherwise isn't significantly different between minified and full source code as far as the user would be concerned. [1]: https://news.ycombinator.com/item?id=37072473 https://news.ycombinator.com/item?id=37072473
- midoridensha 3y agoI'm not talking about the browser's performance, I'm talking about the network bandwidth. All that extra JS code in every HTTP GET adds up. For a large site serving countless users, it adds up to a lot of bandwidth.
- bee_rider 3y agoSomebody mentioned negligible/deleterious impacts on bandwidth for minified code in that thread, but they seemed to have low certainty. If you happen to have evidence otherwise, it might be informative for them.
- mannerheim 3y ago>JavaShit Glad to see the diversity of HN readers apparently includes twelve year olds. Anyway, you do realise plenty of languages have compilers with JS as a compilation target, right? How readable do you think that is?
- Dalewyn 3y ago>Glad to see the diversity of HN readers apparently includes twelve year olds. The abuse of JavaScript does not deserve the respect of being called by a proper name. >Anyway, you do realise plenty of languages have compilers with JS as a compilation target, right? How readable do you think that is? If you're going to run "compiled" code through an interpreter anyway, is that really compiled code?
- mannerheim 3y ago>In computing, a compiler is a computer program that translates computer code written in one programming language (the source language) into another language (the target language).