Ask HN: Is it just me or is the AMP project making everything slower?
I have a vague idea of the point of AMP, which is to speed up the delivery of web pages. However:
1) I'm not convinced the web pages were really _that_ slow to start with, so it feels like an unnecessary project (well, excepting the fact that web-page bloat has massively increased as people use more and more javascript libraries &c.).
2) Perhaps I'm being a bit old fashioned, but I don't really understand what was wrong with a browser serving a web page made out of some HTML, CSS, and Javascript. It feels like we're replacing one technology with another (and that latter one comes from Google, which makes me nervous). Do we really want AMP to be the way we serve the web?
3) I haven't properly investigated, bt I'm assuming that this delay is some script which is waiting for the data to load from the AMP CDN, and once that times out it displays the underlying content (I did check and loading this page [1] is almost instantaneous yet the content only displays after three seconds). Any insight into why it's seen as acceptable for this to be so slow when it is unnecessary for displaying the page?
[1]: https://www.ehow.co.uk/how_5840711_test-electrical-outlet-digital-multimeter.html
[+] [-] kjullien|7 years ago|reply
The problem however here is that this animation is usually triggered before the 8s, as soon as the AMP javascript has been served from the CDN. Your adblocker of something of the sort is blocking it which results in you having to wait for the hard coded 8s fallback to see the page no matter if the content is already loaded.
AMP is beautiful.
[+] [-] justinph|7 years ago|reply
To be a valid AMP page (at least, according to the Google overlords) you _must_ use the CDN'd AMP scripts. This is the very antithesis of what the world wide web is supposed to be about. IMHO, it's not at all unreasonable to block stuff from domains you don't trust, especially domains controlled by large surveillance corporations. The web should be more resilient. AMP makes it brittle.
[+] [-] EvilTerran|7 years ago|reply
[edit]
Update: I got to a browser I could test it on. Unfortunately, it turns out uBO doesn't let you apply :style() rules to all pages indiscriminately, you have to specify a domain name pattern - which is pretty annoying, because the principle is evidently sound; this does work on the link in OP:
Hrmph.Alternatively, you could use a CSS injection addon (or userContent.css, in Firefox) to add the rule to all pages:
Or do it with a userscript (ie via Greasemonkey or similar).[edit 2]
It appears uBO is aware of a need for something like this - they provide an injectable "scriptlet" that adds the necessary CSS: https://github.com/gorhill/uBlock/wiki/Resources-Library#amp...
Unfortunately, scriptlet injection also can't be applied to every page indiscriminately. :/
So I'm just mentioning it here for completeness' sake.[+] [-] NeedMoreTea|7 years ago|reply
I naively assumed, to begin with, that they'd pushed out something broken. Except it never got resolved, which surprised considering the length of delay. So I resolved it by pretending they no longer exist.
I'll likely never know if they ever do resolve it.
[+] [-] SimeVidas|7 years ago|reply
That being said, this is most likely the culprit. If OP is blocking AMP CDN, the inlined CSS code will hide the content until the CSS animation completes after whatever the timeout is nowadays.
[+] [-] lucb1e|7 years ago|reply
That sounds awfully convenient for whoever cooked this up.
[+] [-] black-tea|7 years ago|reply
[+] [-] Falkon1313|7 years ago|reply
Right. It's super easy to make lightning fast web pages. In fact, that's the default state of a static HTML page. It actually takes a lot _more_ work to make pages slow by adding tons of javascript, dependencies, server-side applications, etc.
From the article linked elsewhere in this thread: >The 90th percentile weight for the canonical version is 5,229kb. [...] The 90th percentile request count for the canonical version is 647
There's the problem. Over 5 megabytes and 647 requests for one article? 5MB is equivalent to about 20 full-length novels or 1,000 pages of text. And 647 requests?! That must be one extremely comprehensive article, right? No, it's 1 request for a brief article and 646 unnecessary requests wasting bandwidth to load unnecessary stuff. Then people wonder why it's slow. But someone put in a lot of work to fluff that page up to be that huge and slow and use that many requests.
[+] [-] pornel|7 years ago|reply
and looks fast mainly because Google preloads it: https://ferdychristant.com/amp-the-missing-controversy-3b424...
[+] [-] HALtheWise|7 years ago|reply
[+] [-] SimeVidas|7 years ago|reply
When comparing AMP pages to their associated canonical pages, the most striking difference is that AMP pages are significantly lighter (905 KB vs. 2,762 KB) and load significantly fewer assets (61 vs. 318 requests). (All numbers are median values from testing 50 pages.)
Many people have slow phones and expensive internet, and for them this difference enables them to browse news sites, literally.
[+] [-] aboutruby|7 years ago|reply
Would have been much better to use Lighthouse / PageSpeed as a basis for showing optimized pages.
[+] [-] napsterbr|7 years ago|reply
Sorry for the rant. I'm just genuinely disappointed in what the web has become.
[+] [-] pkamb|7 years ago|reply
[+] [-] shash7|7 years ago|reply
[+] [-] jayd16|7 years ago|reply
[+] [-] justAnotherNET|7 years ago|reply
[+] [-] gregable|7 years ago|reply
I just tried fetching http://www.reddit.com/ in an incognito window (no personalization) on a fast connection and it took 1.2s to get the first byte on the connection. I can't say if this is typical, but the AMP Cache has much faster delivery (~30ms) even before considering the preloading.
[+] [-] chuckgreenman|7 years ago|reply
A mark in its favor though is local news sites. They are desperate to be at the top of the search page so when they join AMP, and you look at their AMP pages all of a sudden the loads of dark patterns they usually employ are absent.
[+] [-] andy_ppp|7 years ago|reply
[+] [-] acdha|7 years ago|reply
[+] [-] vivekd|7 years ago|reply
I'm switching over to php because it's the simplest language that seems to have CORS headers without requiring middleware packages. It seems like AMP can't even do something as simple as a contact form without CORS headers. I'm sure an experienced programmer could solve this problem easily but it makes things harder for amateurs like me.
It also doesn't seem to work with bootstrap so I've had to switch the whole thing over to basscss.
It seems like choosing AMP limits the other technology you can use.
[+] [-] wmf|7 years ago|reply
[+] [-] dang|7 years ago|reply
https://news.ycombinator.com/item?id=18289349
[+] [-] SquareWheel|7 years ago|reply
[+] [-] ocdtrekkie|7 years ago|reply
[+] [-] tgsovlerkhgsel|7 years ago|reply
Maybe an unpopular opinion, but if you're getting a slow load/blank page because you're blocking parts of the content, yeah, "it's just you". Without the fallback mechanism that gets triggered after a few second, you'd just be stuck at the white page.
A good site will load faster than AMP, on a decent connection it may even be comparable to preloaded AMP. However, news sites have been pretty universally horrible at making good web sites. If someone stood behind their web developers and management with a whip, forcing them to build decent web sites and disallowing them from adding bloat, AMP would likely be unnecessary.
Part of the benefits of AMP is the possibility to preload, which allows for near-instant page opening from the search result page (unless you're blocking content, of course), the other part of the benefits is being that whip.
My overall experience with AMP has been positive.
[+] [-] DyslexicAtheist|7 years ago|reply
sadly it's the management, marketers, sales who are standing behind them and holding the whip. Most places measure engineering quality by how many features you can push through your CI/CD pipe (minus the fault-reports, breakage that the pipeline generates).
When everything works perfectly it isn't appreciated as it indicates that engineering isn't running at full capacity. The same problem we have with security and all resilience topics: how do you measure & budget (or in security monetize) something that is supposed to be invisible to the end-user?
As for AMP it's not just a tire-fire it's a clear attempt to break the open web and create lock-in for competitors.
[+] [-] throwawaysea|7 years ago|reply
[+] [-] jonas21|7 years ago|reply
Have you tried not blocking the script?
[+] [-] _fbpt|7 years ago|reply
[+] [-] SquareWheel|7 years ago|reply
[+] [-] gtf21|7 years ago|reply
[+] [-] abalone|7 years ago|reply
[+] [-] jefftk|7 years ago|reply
The reason we need AMP now is that you can't otherwise preload a page in a privacy-preserving way.
Webpackaging will allow doing this without AMP though: https://github.com/WICG/webpackage/blob/master/explainer.md
(Disclosure: I work at Google on making ads be AMP.)
[+] [-] davegauer|7 years ago|reply
[+] [-] WalterSear|7 years ago|reply
[+] [-] JesseWright|7 years ago|reply
[+] [-] Marsymars|7 years ago|reply
[+] [-] lsadam0|7 years ago|reply
[+] [-] super-serial|7 years ago|reply
Don't give Google more power.
Implementing your website in AMP is basically handing the keys of the web over to Google. They're going to make it more and more ridiculous to stay AMP-compliant and you're going to be shut out if you don't play their game. Eventually they'll enable/disable features of AMP-based sites arbitrarily... similar to how they determine autoplay policy on their "approved sites list." Do you think Google should be the all-powerful being that determines what features you can have on your website? That's the future you're opting into if you implement AMP.
[+] [-] newnewpdro|7 years ago|reply
[+] [-] anuraj|7 years ago|reply
[+] [-] zzo38computer|7 years ago|reply
For webpages that do hide everything, I define my own CSS overrides which prevents the <html> and <body> element from ever being hidden, opacity less than 1, or similar. Further rules can be added to prevent <body> from being animated or having transitions.
What is wrong with just HTML, without CSS and JavaScript, or in some cases just plain text and not even HTML?
[+] [-] k_bx|7 years ago|reply
[+] [-] markovbot|7 years ago|reply
[+] [-] kevingadd|7 years ago|reply
[+] [-] anticensor|7 years ago|reply
[+] [-] trynewideas|7 years ago|reply
[+] [-] slig|7 years ago|reply