Hacker News new | ask | show | jobs
by austinpray 4243 days ago
Actually just got done benchmarking this. The conclusion was that it is a worthless optimization compared to just sending the client a gzipped webpage without minifying first. https://github.com/yeoman/generator-gulp-webapp/issues/215#i...
1 comments

I appreciate the benchmark, but "worthless" was your conclusion.

What your benchmark shows is that gzipped pages may be as much as 20% larger than minified + gzipped pages. Even larger pages typically were 3-5% larger.

Sometimes you'd kill for a 3-5% improvement.

I'd save murder for something more valuable. Changing your load time from 10s to 9.5s is hardly a noticeable improvement. I've optimized many a web page and extra whitespace in HTML has never once been the bottleneck. It's bandied about because it is a magic button that takes no analysis or hard decisions to implement, not that it is effective.
Sometimes you've gotten all the low-hanging fruit, and the bottleneck is something that you can't easily avoid. Then you're left finding a bunch of "worthless optimizations" that hopefully add up to an improvement.

I would agree that it's not the most important optimization early on, it's probably not even worth doing at all unless either it's trivial or your project is big, stable, and consuming tons of resources. But that's not the same as worthless.

It's also the case that mature tools (from your compiler, to SQLite, to your browser) chase "worthless optimizations" all the time. Front-end development is in such a state of flux that we don't expect our tools to do that. But eventually we will.

"Worthless" is just too blunt of a verdict.