Hacker News new | ask | show | jobs
by p_l 1637 days ago
Consider typical Medium blog post.

If by chance you block certain actions, you'll see it spin ridiculous amount of CPU, trying to sent tracking data all the time over graphql.

Some tracking systems injected (often without developer involvement, using so-called tag managers) will send your mouse position and clicks.

Through tag managers, you can easily end up loading 50 different scripts, often compiled with attendant framework code, usually in chains of tag manager loading tag manager (classic example - using Google Tag Manager to load Facebook manager and Google Ads, which then issue multiple calls to load JavaScript ads and trackers, which might involve further script loads).

And the tag managers are often managed by marketing in complete separation from any development or QA, so what was reasonably good website loading fast even under limited network conditions, suddenly turns into huge freeze-fest as 3 autoplaying videos get preloaded, 2MB JS/CSS animated overlay ad loads in, 3 ad boxes are filled in dynamically , and don't forget 15 trackers, 4 of them from ad services, 8 of them added by marketing team with possible duplicates, and 3 of them part of malware loaded by the ads.

2 comments

I guess.

The fact is, modern javascript is FAST. And with http3, and compression, you can make things load really REALLY fast. Much faster than in 1994!

And you have things like tree shaking where you can make the js tiny. Not speaking about wasm, that’s even faster, or putting things to web workers. Modern CSS is so easy to use. And of course CDNs are nowadays all around the globe. Chrome debugging tools are pretty good to debug slowness.

What I am saying by long way and repeating… it’s easier than ever to make a fast website!!! I know first hand, I made some websites recently, with really heavy logic on the FE in JS.

So why are all these websites so slow… ugh.

The tools are there! It’s not like it is inscrutable.

Round trips for ad auctions are a part of it, but my take is that there are redundencies, literally a dev team that doesn’t exist anymore wanted to use one metrics tracker, it was never deleted and a newer team introduced a separate stack to check how long you gaze (sorry, “dwell”) at each paragraph. Multiply this by 10 years. Medium used to be relatively snappy (cached CSS and text + pretty slick lazy loaded images) but nowadays its another lumbering dinosaur.

I guess it’s related to that notion “groups of people can never admit a mistake” - if they ever did a clean sheet redesign it could turn into neo-facebook/reddit (somehow even slower due to extremely tall dependencies) - but they can never go back to first principals of how the site used to work, it would be admitting that things have gotten worse with time.

And the core website that the developers actually see while working on it might be just as fast as you imagine!

The developers are not in charge, usually, of what rules will be loaded into a tag manager by the marketing team (which might involve different sets based on URL or various other tracking data). The tag managers themselves and base ad auction and spyware stuff might be pretty performant, too - it's when you hit all those third party ads etc. that you might also see some shitty code.

But when many of those "features" are written assuming all the extra budget for themselves, well, things go bad fast.

Any way to stop all those requests?
Well, uBlock Origin and uMatrix worked pretty well for that, but with new Manifest v3 the feature will be lost
That's for Chrome. I'm on Firefox.
I think there's uBlock Origin for Firefox?
I was referring to Manifest v3, not uBlock Origin.
Mozilla announced that they are also adopting Manifest v3, but not sure if they are going to disable v2, or whether they would continue to provide extra APIs that would allow for continued operation of tools like uBO