6 ms·
What's this guy saying is "worse"? Just that there's a few extra MB of dependencies? What's bad about that?
by robomc 5y ago
What's this guy saying is "worse"? Just that there's a few extra MB of dependencies? What's bad about that?
- kevingadd 5y agoA huge % of internet users are on slow connections and cheap devices with slow processors/limited RAM, so "a few extra MB" of javascript dependencies can mean 1+ second increases in load time on every page load
- kingcharles 5y agoAlso connections with small transfer limits. I am stuck on a cell connection and the limits make these huge sites unuseable as they eat $$ just to browse them.
- robomc 5y agoIt depends on the site and the use case, but I'd have thought that if you do, say, 10 minutes of interactions with a complex application, every few days, a chunked and cached SPA payload, with fairly light fetch requests for json after the initial load, would probably result in less transfer overall than a standard website. And again, leaving marketing / advertising / analytics scripts out of the picture, the JS in both cases will be a tiny part of the transfer when compared to images.
- cerved 5y agolaughs in Mb/s
- jbergens 5y agoIt shouldn't be on every page load. The first will take more time but then you cache the js. More js may be loaded but it should not be a few extra MB per page.
- kevingadd 5y agoJS takes time to parse and execute on slow phones
- kreeben 5y agoMe, checks news site, battery becomes drained. But energy is abundant, right?
- robomc 5y agoThat's primarily because of third party advertising and marketing / analytics scripts though. I really doubt the core client-side rendering of a page (which isn't even common for up-to-date implementations), and the bundled js required for that to take place, is what's sinking your battery. It's also hard to picture a news website where the webpack chunks are going to be a noticeable fraction of the total page load expense, when images are factored in. For example, on CNN's homepage, of the 10MB of data and 200 requests my browser did, around 1MB of it was actual core JS served from a CNN domain, and even less of it looked to have ever gone near a package manager.
- kreeben 5y agoAll that JS needs to become 1. parsed 2. lexed 3. eval'ed and executed Not cheaply, but expensively.
- cerved 5y agobut the article is about using frameworks to deliver the core as an app. What you're talking about is another problem
- robomc 5y agoTrying to picture a major website where something like react-dom, via webpack, is the expense as opposed to all the marketing / advertising / analytics fetches, bindings and page updates.
- masswerk 5y agoAdding a quite obvious "/s".