3 ms·
> I can't believe you wouldn't care about an extra 10-20% dead code stripping, that's a non-trivial improvement. Care? Sure, we do, but honestly we can probab
by abritinthebay 11y ago
> I can't believe you wouldn't care about an extra 10-20% dead code stripping, that's a non-trivial improvement.
Care? Sure, we do, but honestly we can probably get that by being smarter with our code atm. Like I said - it's pretty legacy in many (most) areas.
And to be fair - it was much closer to the 10% figure most of the time than the 20. Sometimes less.
Given our kind of unoptimized dev flow (for JS anyhow, we're pretty good overall) it meant that Closure was just... more of a pain in the ass (for many reasons, the JVM didn't help either, yet another moving part).
So we chose dev productivity over it. When our codebase is more streamlined and modern-looking I think we'll re-evaluate and trust me Closure will be on that list.
> have you tried it recently?
About 6 months ago. Was better, just not as smooth a flow and fast as Uglify was. Glad to hear that it's an ongoing effort though.
> My view is generally, it's better to spend time at compile time.
Generally I'd agree... if it wasn't that our dev flow often had to include compiles (due to... reasons I can't get into here). This is a problem we're working to fix on our end but it did make Closure a lot more annoying, unfortunately. We did used to use it, so I'm not talking from a position of not having used it here :)
> Generally the larger the app, the more likely transitive dead code will be pulled into the initial download without something like CC.
Generally agree. However we have a LOT of strange orphan code (that we're clearing up) which means our dead-code was surprisingly low across the project while perhaps still dead code at some specific point of access.
Annoying? Yes. Edge case? Perhaps. I think it's more common in large old projects than any developer would like unfortunately.
Thankfully there is roadmap and we WILL be evaluating Closure when we get further along. Like I said - I used to be the main cheerleader for it here.