Ask HN: Is it just me or is the AMP project making everything slower?
71–80 of 189 posts
Re: Ask HN: Is it just me or is the AMP project making everything slower?
#72Earlier quoted context omitted.
Are you upset that the website is using a CDN? That is the standard distribution method for common libraries. As for the other half of your analogy - stop poking holes in the gas tank and it won't need active service.
Using a CDN isn't the problem on it's own; the problem is the (unfortunately common) shoddy programming practice of assuming error never happen. Good programming almost always involves checking for and properly handling errors. Using the returned value from fopen(3) without checking if it was NULL probably results in the program crashing when displaying a simple "file not found" error message would have been more app…
All three cases are actually covered (full-script support, partial-script support, and noscript support). That's more resilient than most apps.
Re: Ask HN: Is it just me or is the AMP project making everything slower?
#73I sadly have to code AMP for work. The reason you see a white page is that the boilerplate code required for any AMP page to be valid includes : webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both; With visibility set to hidden for every element on the page. This is used to minimize page rendering artifacts for the end user, which is one of AMP's main goals, content should be fixed. The problem however here…
That sounds awfully convenient for whoever cooked this up.
Re: Ask HN: Is it just me or is the AMP project making everything slower?
#74The most frustrating is that AMP version of app/pages/websites are very incomplete, e.g. the AMP version of a reddit post has only 3 comments (and the "load more comments" button is buggy). Would have been much better to use Lighthouse / PageSpeed as a basis for showing optimized pages.
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.
Re: Ask HN: Is it just me or is the AMP project making everything slower?
#75Earlier quoted context omitted.
The intent of the feature seems to be to hide content until it has been laid out properly, which is generally a positive change to the experience because you can't read stuff while it is jumping around. In that sense, the website is "deliberately" stopping you from seeing static content in the same sense that browsers deliberately don't flash the raw HTML code onscreen before they have finished performing layout oper…
I is actually both. If it would be just a fallback then the time it uses would be at most 5s, more realistic 3s. The think is, if you are on a internet connection where you have frequent loading time of 3s for the _basic_ content, then you are used to seeing partial loaded pages and you likely love it if the connection happen to load the content you care about first, potentially leaving the page before it's completel…
It only looks malicious because you're looking for it to be malicious.
Re: Ask HN: Is it just me or is the AMP project making everything slower?
#76Earlier quoted context omitted.
Downloading a website sans scripts takes strictly less time than downloading and executing scripts. A website that hides its content for 8 seconds because scripts are disabled is a defective website which deliberately stops users from looking static content (amp uses css animation).
The intent of the feature seems to be to hide content until it has been laid out properly, which is generally a positive change to the experience because you can't read stuff while it is jumping around. In that sense, the website is "deliberately" stopping you from seeing static content in the same sense that browsers deliberately don't flash the raw HTML code onscreen before they have finished performing layout oper…
I really only care about the text on most websites, but I end up waiting for a lot of assets before I can see that. I understand why google wants to avoid having the page redraw the layout as assets arrive, that can also be annoying if done with a lot of relative formatting.
But for me, on average, the experience is worse than non-AMP sites.
Re: Ask HN: Is it just me or is the AMP project making everything slower?
#77Earlier quoted context omitted.
Disabling javascript doesn't disable css animations.
The CSS animation only comes into play as a fallback mechanism. The AMP script will force a draw sooner otherwise.
https://www.ampproject.org/docs/fundamentals/spec/amp-boiler...
Here it is pretty-printed and simplified to not have the vendor-specific stuff:
body{
animation:-amp-start 8s steps(1,end) 0s 1 normal both
}
@keyframes -amp-start{
from{visibility:hidden}to{visibility:visible}
}
body{animation:none}
The first bit is for browsers with javascript, but where the network is poor and can't load the minimal required highly cacheable javascript file within 8 seconds. It uses CSS just in case javascript really isn't working anyway such as being disabled per domain or something. The second bit is for browsers without javascript - the page is unblocked immediately.Re: Ask HN: Is it just me or is the AMP project making everything slower?
#78Yes, AMP is rather slow: https://timkadlec.com/remembers/2018-03-19-how-fast-is-amp-r... and looks fast mainly because Google preloads it: https://ferdychristant.com/amp-the-missing-controversy-3b424...
My takeaways from that article: 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,…
See http://text.npr.org or http://lite.cnn.io for example
Re: Ask HN: Is it just me or is the AMP project making everything slower?
#79In many cases AMP is neglibly faster than mobile web page and sometimes slower.
Re: Ask HN: Is it just me or is the AMP project making everything slower?
#80Earlier quoted context omitted.
My takeaways from that article: 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,…
What bothers me about this argument is that there are plenty of other ways to make a news site fast...like just using straight static html content and minimizing JS usage. See http://text.npr.org or http://lite.cnn.io for example
For example, AMP provides an ad component that is probably the by far most performant way to display ads on the web. Without AMP, the site has to use alternative ad solutions, which probably perform worse and load more JS.
The only way for the site to reduce JS would be to find an ad solution that is similar to AMP in terms of performance, and I fear such a solution just doesn’t exist.