Skip to content

Comment on Opera Rejecting Extensions With Minified Code

Comments

I'm glad I'm not the only one who thought "good for Opera."

Obfuscated code is for competitions, not functional software. This is not 1978; the space savings from single-character variable names is not significant. (Or if it is, your code is way too heavy to be running in a browser extension.)

Yeah. As a developer, whenever I see minified code I cry.

It means I work with people who have no sense of reality, and it means all my debugging sessions are going to be way harder and much less productive.

That's a real loss for a fictional gain. Minifying needs to die.

In my experience minified js is 30-40% smaller, which can make a pretty significant difference in terms of load time. The debugging argument doesn't really make sense to me, since the code should only be minified in production anyway.

Still, in the case of a browser extension it wouldn't really make a difference since the files are coming from the disk.

If we're discussing serving it to the browser, just use gzip and get the same size savings without any of the minification!

IIRC you can get slightly more gain with a very aggressive minimizer and gzip than gzip alone.

It's completely pointless for a browser extension though.

Minifying production-deployed code is fine (although gzipping largely eliminates benefits of minifying). If the code is open-sourced, the unminified version is available. If not, the code is not meant to be debugged by you anyway. (I agree, the latter doesn't always apply in non-ideal world.)

More importantly, minifying has no effect on the performance of the app. (unless you're doing some smart stuff like what Google Closure does)

The Javascript engine will JIT it or at least use an intermediate representation as soon as it's loaded, rendering minified or regular code the same. Minifier helps with load times but extensions are local, (and the difference in time is really negligible this first time)

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.