Status: Closed (View Workflow)
Resolution: Won't Fix
dogfood server - ci.blueocean.io
e.g. consider two (of many) resources returned by ci.blueocean.io
The first 1113 lines are duplicated into each resource
1139 lines of boiler plate
480 lines of actual code
But you go ahead and mark this WON'T FIX because your operations team will provision an extra 4 servers to deliver all that boilerplate around the world.
You're probably right though, the inefficiency of the boilerplate will be swamped by general inefficiencies in Michael's proof-of-concept code that stays in production for 6 years.
bwalding its perfectly fine for modules to inline the js they want into their own code, and not have an external bundle at all for small things like that (although it means there are N versions of those objects loaded into the browser, which may or may not be worse), but then there wouldn't be the overhead ratio.
I agree there's no point optimising away those lines if they're going to be bundled up together later on. In the grand scheme of things - worrying about those extra lines of code/comments at the moment doesn't really matter when there's plenty of other stuff to deal with.
Ultimately you have many avenues for performance enhancement - bundle, deduplicate / minify, compress, cache
although it means there are N versions of those objects loaded into the browser, which may or may not be worse
It's not a problem when they are all inside their own bundle. Each of those bundles are wrapped in an IIFE, so these things are isolated/scoped inside it.
In the grand scheme of things - worrying about those extra lines of code/comments at the moment doesn't really matter when there's plenty of other stuff to deal with.
My sentiments exactly ... I'm more than happy to spend time optimising things like this after we have all the bigger fish fried.
BTW ... I've no problem with this ticket being left open. The only point I made was that I didn't consider it to be a "bug" because it's done this way intentionally and for a good reason, but that's just chat.
but more seriously, WHEN we have minification, it should only be 1K overhead per bundle max. probably less (given most of it is nice comments). The overhead of an extra round trip for an externalised bundle would swamp that
(and then we get into discussions on asset chains that bundle it all in to main page load, or not, and then http2, or not etc etc).
What we really need: is servers all over the world so we don't have to worry. DONE.