It would be interesting to benchmark the CPU performance of a full page load and paint for each version. But the last time I brought a similar topic, a bunch of HNers got mad because "starving people in Africa with flip phones and 3G tho", so maybe I'm still objectively wrong years later. Whereas just shipping the code as-is is less likely to introduce a pain point when debugging, source maps are more likely to introduce them when the source map somehow doesn't work or, in rare circumstances, can't accurately represent the runtime code when transpilation is emulating the original code by doing something almost completely different somewhere down the chain.Īlthough this is an "it depends" thing, like everything else, I lean on the side of not minifying things in 2023 when both gzip is adequate and the time it takes to parse and run the main code is not the source of performance problems. I've worked on some apps where, yes, minification really did matter, but minification has also become a default even when it's questionable whether it's even called for. While I agree that source maps can and often do solve the minification problem/confusion, it can also introduce another "vector" for something to go wrong and make production debugging a pain. eliminating all unnecessary whitespace is really, really tiny.įor any site that isn't trying to optimize for 'millions of hits a day!' levels of traffic, why _do_ you minimize all that stuff? It makes the developer experience considerably shittier and the gain seems a few orders of magnitude too small to even bother with it. class names or whatnot in the CSS, or local identifiers in javascript, into short letter sequences means even post-gzip it'll be smaller, but by so little. ![]() My reasoning is that post-gzip, who cares. One of the more intriguing ones on my list is that I _do not minify anything_. Business-wise I decided it's not (currently!) worth investigating. I can name a list as long as my leg as to where I bet I can win quite a bit on optimizing for IAAS cost or UX speed. ![]() I'm orders of magnitude below it - hence, I do not spend much time investigating optimizations. ![]() I don't have a site that sees a ton of traffic, and I know what some of my direct competitors spend on IAAS (and how long their pages take to load). I (thought) I saw where the article was going before it got there, but, the notion that the 'optimization' actually _increases_ gzipped sizes surprised me (I thought the conclusion was going to drive at 'it makes no difference', or 'only a byte or two saved').
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |