if you gzip everything anyhow, why do you ever need to do minification? it doesn't look like you save very much by doing it
@KitRedgrave it speeds up JS and CSS lexing/parsing as well as reducing file size, but that's not much of a factor these days unless you're working at Web Scale
@vyr yeah, i'm really not. thinking that for something like a personal website to just throw random toys onto, it's not really necessary.
and i feel like i would rather not make the source look like absolute hell in the browser. would like to make it easy for the few people who bother to look :)
@KitRedgrave technically it does reduce parse time. And takes up less space in cache and maaaaaaybe speeds code up due to shorter identifiers but I'm just speculating on that one
Also more people know how to minify than know how to get their server to use gzip I think
In some js engines it can have performance impact because the jit will use very rough heuristics like "number of chars in a function" to determine if it's a candidate for optimization.
@KitRedgrave makes understanding the source code harder - for many companies this is seen as a benefit
webdevs: minify the js!!!
also webdevs: make sure you include these long-ass licensing comments, v important, gotta have those
@KitRedgrave It's still smaller if you do it right (reuse the same identifier in different scopes, make certain things more consistent, and they'll compress better), but tree shaking is where the real benefit comes in: removing code you wrote or included, but didn't use, especially an issue when using libraries.
(Yes, I know some people are too cool for libraries, and if it works for them, cool, but I use them judiciously to save time for things I prefer to do.)
@aschmitz oh yeah, tbh i was thinking implicitly of code shaking already being done.
and linking to minified libraries is alright, since those aren't the code of interest
@aschmitz though i guess then you'd have to do symbol mapping in your code for the latter, which nobody does and so your own code would be half-minified anyway if you did that lol
@KitRedgrave Ah, no, I meant that you'd include the libraries in your code for minification, then tree shake the whole thing. Saves you from sending parts of the libraries you don't use. (And in general if you're at the point of counting bytes, you really shouldn't be using libraries from another server/file. The added latency is significant unless your page is *huge*.)
The Vulpine Club is a friendly and welcoming community of foxes and their associates, friends, and fans! =^^=