Lurker News
I’m currently in a country with low speed internet and the entire ‘modern’ web is basically unusable except HN, which still loads instantly. Reddit, Twitter, news and banking sites are all painfully slow or simply time out altogether.

To PG, the mods and whoever else is responsible: thank you for not trying to ‘fix’ what isn’t broken.

Comments (390) 87 threads

Show all comments

Showing thread 11 of 87

exabrial8 replies#
I loathe the modern web. Speed is a secondary to "hey look what we're doing with our frameworks".
dmix3 replies#
Modern front-end toolsets are finally starting to address this by using automated critical css, SSR + "hydrating" on load for interactive elements, webpack treeshaking + chunking of assets into tiny js/css files and only loading code based on what the page/routes asks for, PurgeCSS to get rid of unused css, cssnano/uglify/htmlmin/imagemin, etc. Webpack and these various popular tools has done a lot to make the web better and are default in many starter kits. But we're just beginning to see it go mainstream.

The basic shift back to pre-rendering + delivering only what's needed on the actual page is a big deal which hasn't got enough attention yet IMO. We went completely in the other direction for over a decade because we thought networks and browsers could handle it, but it was too easy to abuse and mobile took over.
There's no reason even very advanced websites can't load quickly, without having to fully compromise back to the 90s non-interactive websites.
News sites and marketing teams still ruin it regardless with all the crap they add on top. But it's far far better than loading a giant blob of 20 jquery libraries plus a big old angular.js or backbonejs app (sometimes both at the same time) encompassing a whole site in one file, even though you just wanted to visit the contact page.
I also blame Themeforest type developers because they're still stuck in the "let's add a hundred JS files so I can parallax and animate two divs" mindset.

wolco2 replies#
A modern css framework would increase the font size change the font type make the reply link a fat button. It would put a card around each parent reply thread.

Getting rid of unused css helps but the additional markup would make the page 4 or 5 times larger.

scrollaway#
A "framework" doesn't do that. A designer does. Or whoever decides to implement it.
dmix#
I see a trend away from that in 'trendy' CSS frameworks like http://tachyons.io/ and https://basscss.com

The Bootstrap stuff you seem bothered by is better for splashy big-headline marketing sites not high-density content like HN.
A lof of web designers cut their teeth designing marketing websites, not app UIs, so it's not surprising when I see it mindlessly used on sites like Reddit's new redesign.

liability1 reply#
> news sites

It's really a sad state of affairs when an industry with such a strong historical connection with publishing is now reasonably cited as an industry worse at publishing than most others.

rangibaby6 replies#
Newspapers have always been full of ads fwiw

Continue this thread — 6 replies

jasonhansel2 replies#
Yeah, but those fixes and workarounds are only almost enough to sometimes compensate for the code bloat that the frameworks themselves have caused.
dmix4 replies#
People seem to be confusing web 2.0/bootstrap style design (see: Reddit's bad redesign) with the frameworks here but the component based approach combined with webpack/compilation steps, which are very much mainstreaming, are fundamentally different than top heavy JS frameworks I spent most of the last decade using.

I dont think people have really seen what server-side rendering (ala Next.js/Nuxt.js), decoupled components, modern treeshaking, minification, and chunking can do for performance. We've yet to have a full web framework designed entirely to encompass this from day one but they're coming and getting better at it.
Outside of the endless 3rd party crap the 'business' guys add, if anything, it's no longer the JS framework size and library cruft I'm worried about it's how many object watchers I've got at runtime via Vue.js and reactive style programming (which automatically adds Object.observe style watchers to all data) + component initializers (which can add overhead to simple HTML templates). Fortunately with the new Vue 3 function API there is a clear distinction between observed values vs static/immutable/config data. The amount of observers per page dropped dramatically. Otherwise looking at a Vue project in the performance tab shows it's highly async and efficient.
The new Vue functional API (allegedly) is also going to be far easier to treeshake so you really only ever get the library features you're using. Even for something like Lodash or Ramda where you might use only 10% of the functions it's a big deal.
I'm sure React is making similar progress in this direction and it was already smaller than Vue.
CSS Frameworks have some ways to go and PurgeCSS isn't perfect but using a functional CSS framework like Tailwind or Tachyons also helps in this regard, so all of the stuff isn't intertwined and can be stripped out.
This type of tooling really does massively improve the state of things automatically, even with poor coding practices or large applications spanning multiple pages. SSR, treeshaking, chunking, stripping unused CSS, etc is a 'zero cost' type optimization that I've seen turn 700-1000kb dev assets into loading 100kb base + a few 5-10kb js/CSS files dependent on the page.

Continue this thread — 4 replies

userbinator#
Seeing the parent post you're replying to reminds me a lot about how mainstream compiler optimisation works: create a lot of crap "unoptimised" output, then add many additional layers of complexity in an attempt to get rid of the unnecessary crap, instead of the quaint idea of simply not creating so much crap in the first place.

"All problems in computer science can be solved by another level of indirection, except for the problem of too many layers of indirection."

benologist#
Iterating without a destination in mind. Assigning people to work on something vs finish it. This is in stark contrast to games which get released, get stabilized, and stop development. This model would suit a lot of software aside from security or dependencies necessitating updates but if we want we can just iterate forever.
j793 replies#
I’m always amused when the frameworks being used advertise things like “We make coding fun!”

I tend to think “but what about making the web enjoyable for the end user?”

Aeolun#
The end user is paid to deal with whatever we provide them.

But more importantly, the fact that the page loads 2 seconds longer is a drop in the bucket compared to the insane processes our business people dream up.

tmh88j#
>I’m always amused when the frameworks being used advertise things like “We make coding fun!”

I understand where they're coming from having dealt with a few legacy frameworkless spaghetti code bases that have no documentation. Give me bad code to maintain in a known framework over bad code without a framework anyday. Adding features and debugging in those conditions are no fun at all.

jdnenej1 reply#
End users don't care. When they see a slow website they think "Awesome, now I have a reason to buy that new iPhone Jessica has because this one is getting slow"
ummonk#
I love the power of modern web apps built using modern frameworks. I hate that ordinary content websites decide they need to be built using such frameworks.
boring_twenties#
Secondary? If only. It's more like not even considered at all.
mistersys1 reply#
I understand where this is coming from, however whenever I interact with a app that re-loads the whole window on every major interaction, I start getting frustrated because of the jarring, slow transitions, most modern web apps are faster after the initial page load, albiet on my 15" 2018 MacBook Pro.

Stop blaming the modern web. There are plenty of slow PHP and rails sites and plenty of slow React based sites. Of course speed is second priority, I'd much rather have users using my app with a mediocre experience than nobody using my app. However, as the web supports more tooling and frameworks continue to evolve towards web assembly, I believe will start to have web apps approaching native speed.
The reality is that requiring a server to render every page limits what you can do with your app. Even if modern tooling is overused, developers will always move towards what allows you to do more.
I'd much rather focus on making modern tooling faster than complaining about the modern web.

zanny#
You can have a very tiny website with custom onclicks to load / change elements via callbacks. The bloat of JS frameworks to do everything including generate the actual HTML client side is totally separate from having dynamic page content.

I always strive to keep the client side stupid. I should be sending as much of the final document as possible from the server and any interactivity needed should also produce as little work for the client as possible.

muzani2 replies#
Honestly, with modern things like Webpack, minify/uglify, CDNs, web speed should be much better on low bandwidth sites compared to the past.
Aeolun1 reply#
My parcel with a fairly simple app spits out a 10MB release build. We still have some way to go.
jdnenej1 reply#
How many libraries did you add? Last I checked the major ones were about 1mb
Aeolun#
I think the AWS library is pretty insane.
dwheeler#
It depends on how you use it. Size matters. On a site I manage, we send about 64KB of JavaScript and we are working to make that smaller... and the main site functionality works when JavaScript is disabled.

In contrast, many sites seem to think that 1MB of JavaScript, or even 5MB, are acceptable, and they can't even show simple static content when client-side JavaScript is disabled. On a slow link, 1MB of JavaScript means that the user has probably given up. And it's not just the size. 200KB of HTML is far far faster than 200KB of JavaScript; web browsers are highly optimized for handling HTML, while processing JavaScript is necessarily much slower. JavaScript is great for some things, but like a sledgehammer it's not always the best solution. Too many people aren't considering the real end-user experience. "Pretty graphics, but it takes 5 minutes to download" is usually not a worthwhile tradeoff.
To paraphrase Goldblum:
Your web designers were so preoccupied with whether or not they could use JavaScript, they didn’t stop to think if they should.

andrepd3 replies#
To a certain extent, it's developers serving themselves, not the user. Your job is not to show off the latest frameworkify.js and get internet points when you blog about it. It's also not to make your life easier (like by including a 1MB js library that saves an afternoon of your time). It's to make the user's life better. Just do your damn job! \end{rant}

Continue this thread — 3 replies