4 ms·
Most of the gains in there are from stripping out comments. That plus whitespace removal gets you most of the benefit. I don't think the parent was advocating f
by ricardobeat 10y ago
Most of the gains in there are from stripping out comments. That plus whitespace removal gets you most of the benefit. I don't think the parent was advocating for dropping minification completely, but investing massive effort when you're already at the crest of the curve.
- Klathmon 10y agoIt's not like this is a zero sum game. Attempts at improvement don't hurt at all, and in some cases can help a ton.
- iainmerrick 10y agoBut they can hurt sometimes -- not all optimizations are always safe.
- Klathmon 10y agoOf course, but there is still value in "unsafe optimizations" for those who won't be impacted by them.
- diamondo25 10y agoStripping out comments would be one, but eventually remove all useless code and optimizing it using tools like Google Closure Compiler is way more effective in most websites that use a single bundle for everything.
- ricardobeat 10y agoWhen the subject is CSS, dead code removal is a way more complex problem, and only possible if your usage falls within certain constraints. Best bet is a component system with scopes styles that ensures you are only loading what is required.