me: why the hell is this "unified bundle" 3MB (unzipped)?
-
@slightlyoff I think we need more tools that analyze bundles for big uh-ohs like that.
-
@mensrea The cool thing about being a performance investigator in 2024 is that you get to be an explorer; it's a safe bet that you're the first person to actually *read* what a team spent hundreds of hours amalgamating with webpack and NPM and a dozen other horrors.
-
Alex Russellreplied to Dave Rupert last edited by [email protected]
@davatron5000 A modest proposal: we should simply decline to load/execute code like this unless it's served from an RFC1918 address (e.g., `localhost`).
Very demure, very mindful.
/cc @aluhrs
-
Anyway, I'm sure it's *fine*. They use gzip! That's gonna pull that 3.2MB down to a *much* more reasonable...
[ checks notes ]
...1.1MB on the wire.
-
Alex Russellreplied to Alex Russell last edited by [email protected]
Oh. My. God.
Friends, it's so much dumber than I could have possibly imagined. What does this bundle do? Is it the primary thing on the page? Nope. It's *the paywall script*.
On pages *that already have React and all the rest*. From a *separate* multi-meg bundle.
-
@slightlyoff all that for a *checks note* <dialog> ?!?!!?
-
@slightlyoff At what point does a "micro frontend architecture" become a "bloated frontend architecture"
There's probably some silly reason like "Team A uses React 18, but the paywall team is blocked from upgrading and is still on React 16.9 so we need to load both bundles"
-
@konnorrogers And a spinner. And a `fetch()` or two. But don't forget the spinner. There's a spinner.
-
Alex Russellreplied to Konnor Rogers last edited by [email protected]
@konnorrogers Some day I'll be able to tell the story of a top-10 e-commerce retailer that served a *separate* copy of React + deps to *each* of the home page, search results page, product detail page, and checkout flow.
Why?
"Scale"
The idea was that each page was a "separate app" that each team "shipped independently". People said this with straight faces. Out loud.
No, really.
Spoiler: the only that that scaled were directly attributable losses.
-
@slightlyoff that is....horrifying
-
@konnorrogers I mean, only if you know what computers can do and want to do a good job for users?
-
@slightlyoff on an ecommerce site of all places?! Thats borderline negligent...and a failure of leadership to prioritize users over each team getting their own little sandbox. I imagine plenty of perf testing people in house have brought up the issue. But leadership either doesn't care, or doesn't have enough power to make change.
-
@konnorrogers It's at least malpractice.
Like many of these teams I got called in to chat with, the "new guy" had fired all the byte-miser old guard for not jumping at the opportunity to ruin the site with JS ("not team players").
The JS-industrial-complex is nothing if not adept at muscling out those who dare speak up for the user.
-
@slightlyoff This entire thread needed a content warning
🫣🫠 -
@jaredwhite "TW: `view-source:` content"
-
@slightlyoff If you want to get nervous, check out #Oakley's website: https://pagespeed.web.dev/analysis/https-oakley-com/vmod5pnwqy?form_factor=mobile - they are notoriously bad at #webperf.
-
@niutech *10 seconds* TBT!?!!!
-
@slightlyoff @konnorrogers @paulshryock I’ve worked on a site like this and it did scale better than the monolith that existed before it. Not to mention a lot of work went into the user flow so most users rarely saw more than one slice of those pages anyway.
Could they have built something better? Sure. Was an e-commerce site going to attract leadership that would drive things that way and hire the talent to do so? Probably not.
-
Alex Russellreplied to Joe last edited by [email protected]
@threetonesun @konnorrogers @paulshryock A lot of managers I interact with talk about "scale" and "hiring" and "monoliths" like this, and what they really mean is "we don't want to care".
Even when outstanding people are offered up on a platter, they turn them down because of the dogma. "The scary monolith" is code for "something I won't get credit for spending huge amounts to replace".
Performance is about mastery, and a lot of folks just don't want to bother. We should call it what it is.