In which @slightlyoff is heralded as a saviour of PHP. https://thenewstack.io/developers-rail-against-javascript-merchants-of-complexity/
-
@brucelawson [ inaudible ]
...and so you see, it's all very easy and quite natural.
-
Evil Jim O’Donnellreplied to Bruce Lawson ✅ last edited by
@brucelawson @slightlyoff balderdash. Simply `npm install` a React component library that abstracts away the messy implementation details of JS strings with the magic of JSX.
<ConcatenateStrings>
['Hello', ' ', 'World']
</ConcatenateStrings> -
Bruce Lawson ✅replied to Evil Jim O’Donnell last edited by
@eatyourgreens @slightlyoff thank goodness you were here, JimSX!
-
Evil Jim O’Donnellreplied to Bruce Lawson ✅ last edited by
@brucelawson @slightlyoff I’m feeling cranky because I’ve been looking at a home page with a total page weight of 31MB, which only shows a loading spinner if you disable JS.
Home page loads in ~11MB of images, ~13MB of JS · Issue #6254 · zooniverse/front-end-monorepo
Expected behavior Images should be optimised for display online, and the home page should ideally load in less than 1s. Current behavior The home page pulls in a bunch of unoptimised images from the Zooniverse blogs, ranging in size from...
GitHub (github.com)
-
Bruce Lawson ✅replied to Evil Jim O’Donnell last edited by
<Box as='main' height='100vh' align='center' justify='center'>
<Loader />
</Box>FFS
-
Evil Jim O’Donnellreplied to Bruce Lawson ✅ last edited by
@brucelawson @slightlyoff TIL: the official YouTube embed uses 2.5MB of JS, or roughly the amount of code needed to put a space shuttle in orbit.
-
Evil Jim O’Donnellreplied to Evil Jim O’Donnell last edited by
@brucelawson @slightlyoff shut me up. I think this is actually less code than a YouTube embed.
GitHub - chrislgarry/Apollo-11: Original Apollo 11 Guidance Computer (AGC) source code for the command and lunar modules.
Original Apollo 11 Guidance Computer (AGC) source code for the command and lunar modules. - chrislgarry/Apollo-11
GitHub (github.com)
-
Alex Russellreplied to Evil Jim O’Donnell last edited by
@eatyourgreens @brucelawson For many years while I was at Google, I would occasionally post to Plus (lol) that one of the most leveraged web performance opportunities in the world was to rewrite that bundle. Nobody took me up on it, but some go-getter PM *did* sunset the lightweight `ga.js` that had been hand-tuned in favour of the `gtm.js` chonkster.
I assume they got promoted.
-
@slightlyoff @eatyourgreens Some chums used this; I can't comment on its performance/ current status https://github.com/paulirish/lite-youtube-embed
-
@brucelawson @eatyourgreens I use a web component version of it:
GitHub - justinribeiro/lite-youtube: The fastest little YouTube web component on this side of the internet. The shadow dom web component version of Paul's lite-youtube-embed.
The fastest little YouTube web component on this side of the internet. The shadow dom web component version of Paul's lite-youtube-embed. - justinribeiro/lite-youtube
GitHub (github.com)
-
Zach Leatherman :11ty:replied to Alex Russell last edited by
@slightlyoff @brucelawson @eatyourgreens the original `lite-youtube-embed` was a web component too (for the record)
-
@slightlyoff @brucelawson @eatyourgreens They’re both web components, I think? Nothing says why you’d choose one over the other, which isn’t very helpful – I see the one Bruce mentions is half the size according to pkg-size.dev.
-
Alex Russellreplied to Zach Leatherman :11ty: last edited by
@zachleat @brucelawson @eatyourgreens Didn't put details into SD, and I wanted that.
-
@dracos @brucelawson @eatyourgreens Yeah, the one I went with puts CSS etc. inside shadow DOM, which accounts for size difference