13 ms·
How fast is AMP really?
- majewsky 9y agoA suggestion for the author: Please avoid commas (or dots) as thousands separators. My brain parses "4,604ms" as "about four milliseconds", which would be amazing, but is very much not what you mean. ISO recommends half-width spaces as thousands separators to avoid this kind of confusion. Also, I think thousands separators can just be skipped if your numbers are only four or five digits wide.
- mcny 9y agoI can only imagine. I already hate it when I see something like 1.375€. I can't imagine how infuriating it must be for you. However, I don't know how to half width space. Thoughts?
- userbinator 9y agoNo spaces is my preference.
- johnhenry 9y agoI really appreciate commas a separators within numbers. One man's trash, I guess...
- Sylos 9y agoThe problem is that many countries don't use the comma as thousands separator and rather use it as decimal separator. (And then the dot as thousands separator.) So, "1,234,567.890" becomes "1.234.567,890". If all you have is "7.890" or "7,890", you need to know what system the author uses. What the guy proposes is always using spaces as thousands separators, independent of the system you're in. So, then it would be written as "1 234 567.890" or as "1 234 567,890". The spaces are almost universally understood and don't collide with other meanings. It would still be possible for someone to be confused, if you're at the decimal separator and write your regional separator there, but it would cut out half the confusion.
- johnhenry 9y agoAll good points. The proposal, however, does make the think about this: https://xkcd.com/927/ https://xkcd.com/927/, so I don't know if we'll ever come to a good solution :/.
- Sylos 9y agoWell, this new standard is backwards-compatible to the old standards, as in people will understand it, regardless of what they've learned beforehand. So, I don't think this new standard is really competing with the others.
- RobertRoberts 9y agoThis seems to be a European issue perhaps? I've never once been confused by a comma in a number. In fact, it makes them easier to read, not harder. Can you describe your experience with numbers? Are you a mathematician or in some other scientific field? Also, it seems odd to make a request like this of a (seemingly) random author on the internet. It feels similar to making a demand to change writing style. (ie, oxford comma, em-dash, etc...) Do you think it's reasonable to ask someone else, for what seems to me, is a cultural or occupational perspective should be adhered to just because of an individuals momentary state of confusion?
- user5994461 9y agoYou must be American then because that's the American format. Different countries and languages have different format of numbers. That's one of the most common issue in internationalization. If you send a bill for a 5,000 dollars service, expect your international customers to send you back five dollars. The comma is broadly interpreted as the decimal separator.
- seanmcdirmid 9y agoNot just America uses dot as the decimal separator, see: https://en.m.wikipedia.org/wiki/File:DecimalSeparator.svg https://en.m.wikipedia.org/wiki/File:DecimalSeparator.svg Blue uses the dot, green uses the comma. By population dot wins (since India and China use the American style).
- yxhuvud 9y agoWhat that map show is that space wins because otherwise someone is bound to be confused.
- RobertRoberts 9y agoNo, it's not possible to be confused if you are reading English. It's a comma for thousands and period for decimal. That is how it's done in English. If someone wrote it in German or French and used the wrong decimal separator, then it's an error.
- tzahola 9y agoIMO we should introduce locale-dependent number formatting to HTML.
- gruez 9y agoYou can probably hack one together by styling a <input type="number">
- user5994461 9y agoExcel has it and it's a complete nightmare. Never know in advance what's the locale of the document and the excel.
- yxhuvud 9y agoIt certainly doesn't help that it also make export as csv locale dependent :(
- lostgame 9y ago>> Please avoid commas (or dots) as thousands separators. You might as well say 'please ignore the standards of your country in favour of mine.' Are you really not aware that this is the standard in Europe?
- larkeith 9y agoParent is clearly a European (or denizen of another local that uses commas as decimal markers), as they interpreted 4,604ms as slightly over 4ms. Also, they advise using an ISO (International Standards Organization) standard, specifically to avoid misinterpretation while remaining locale-independent.
- wutbrodo 9y agoWhile it is an odd request, that's not really fair to the parent commenter. He's asking for a _neutral_ representation to be used, so that those used to both format find it easier to read. He even goes out of his way to specify that he doesn't want his format used. It's the same reason I write dates YYYY-MM-DD, a habit I picked up after working in a large company with employees from all over the world. (Though I generally wouldn't request other people to use it as well)
- rocqua 9y agoNo, the request is "Please use a method people from all countries can understand". As OP said, the idea here is to use half-spaces as thousand separators. For the decimal separator, it doesn't matter much what you use. I'd guess the period because it is slightly more prevalent. This method is clear to all users, rather than confusing all of mainland Europe.
- xenadu02 9y agoSo basically Google could get 90% of what AMP provides without AMP itself, because the magic is in the caching and forcibly reducing the ad junk the page loads. Does that about sum it up?
- notatoad 9y agoYes, except how do you propose to implement caching and stripping out the ad junk without AMP?
- gcb0 9y agowith free market! now, seriously, I do that just fine with an ad blocker.
- manigandham 9y agoMake performance (not AMP) matter in search rankings and websites would immediately start getting faster.
- rifung 9y agoI believe it already does actually (I work at Google but not in search so I could be wrong but I believe they talked about this during orientation)
- SquareWheel 9y agoSpeed has been a ranking factor in desktop SERPs for years. It was only recently announced as a ranking factor for mobile too (but we knew it was coming).
- timothya 9y agoSee: https://webmasters.googleblog.com/2018/01/using-page-speed-in-mobile-search.html https://webmasters.googleblog.com/2018/01/using-page-speed-i...
- Shorel 9y agoAnswer: not as fast as the D lang forums. https://forum.dlang.org/ https://forum.dlang.org/
- tzahola 9y agoWow, that site indeed feels fast! Is there a writeup about how it’s done?
- Jackim 9y agoThere's a bit of discussion about it here: https://news.ycombinator.com/item?id=3592769 https://news.ycombinator.com/item?id=3592769 Source of the site is here: https://github.com/CyberShadow/DFeed https://github.com/CyberShadow/DFeed
- jordigh 9y agoAnd the software isn't just rendering the forums. It also simultaneously handles email, Usenet, and IRC relays. Also, it runs on SQLite. I found that the most surprising of all. Web development in D is incredibly fun. I love that I can compile HTML templates into machine code (which of courses catches template errors as compiler errors), I love how fast the result is, I love that there is a very lively collection of D packages around web development. In fact, the D package manager, dub, started as a package manager for Vibe.d, the main D web framework.
- giancarlostoro 9y agoYou can find the source on GitHub it not only runs a web server... It runs an IRC bot too and an NNTP server as well so you can download all threads and post with a newsreader / usenet client.
- tylerl 9y agoAnd not NEARLY as fast as example.com!
- Waterluvian 9y agoHoly crap. The internet on a phone can feel like this?!
- lern_too_spel 9y agoA very low quality article. The whole point of AMP is to define a restricted subset of HTML that is safe to prerender and still provide working analytics to the publisher. When you prerender, the advantage of AMP is substantial as it is impossible to beat a user experience of instant, which is why users prefer it and why publishers go through the trouble of implementing two web versions of their web pages (in addition to Facebook and Apple News non-web versions). The point of the AMP cache is not for CDN speed, as the author mistakenly believed and measured, but for same-origin or CORS prerender, and Google is not the only implementer.
- millstone 9y agoPublishers go through the trouble in order to get the boost in Google's rankings. As an iOS user I find AMP to be quite buggy, and AMP versions of pages like reddit are borderline non-functional. I don't prefer it at all.
- lern_too_spel 9y agoYour experience was due to a bug in iOS that Apple has since fixed. Those of us using platforms that allow quickly updating non-buggy browsers never saw such issues.
- what_ever 9y agoIt's a trouble of writing template once though and it is not that much work. I worked on this at my previous employer and it was alright, little frustrating but once it was done, it was done until you redesign the pages. Disc: Googler but nowhere close to AMP.
- abritinthebay 9y agoIt’s a continuous pita as it’s buggy as hell and as a publisher we are the ones who get blamed.
- manigandham 9y agoIt is absolutely not that simple. We are a marketing company working with hundreds of publishers and this is a constant struggle. It's splitting whatever little dev time they have on yet another format that adds nothing to the already universally accessible "web" version.
- yorby 9y agoHow fast could google.com be if they trimmed the JS fat?
- niutech 9y agoThe non-JS version takes 1/3 loading time of the JS version: http://www.webpagetest.org/result/180402_0J_6a3f29516e9a8bcf06484a975136d3b7/ http://www.webpagetest.org/result/180402_0J_6a3f29516e9a8bcf... vs http://www.webpagetest.org/result/180402_Z3_1bd3e53e1be2668cb583ba24bdd54c3a/ http://www.webpagetest.org/result/180402_Z3_1bd3e53e1be2668c...
- yorby 9y agoThanks. And I have a feeling that it would be much worst (aka better) for a mail.google.com inbox page, even if you keep the useful Javascript. But their javascript is so obfuscated that it is not too easy to test. One time I extracted a simple feature for gmail's javascript... it was fun (probably would be easier for a programmer though)
- throwaway2048 9y agogmail has a basic html mode that is lightning fast.
- niutech 9y agoIf you want to test how fast are AMP pages compared to full pages, check out the AMP Browser Extension: https://chrome.google.com/webstore/detail/amp-browser-extension/mccnchmofleakpdohkmljohfckgpdehb https://chrome.google.com/webstore/detail/amp-browser-extens...
- notatoad 9y agoi tried to turn these tables into graphs because charts of numbers weren't doing much for me. but i suck at spreadsheets, so i don't know how to label these: https://docs.google.com/spreadsheets/d/1ZFWiqXesq8SlOZ3uW9OmRdEtPl1k4VG8dHoS47i3tQI/edit?usp=sharing https://docs.google.com/spreadsheets/d/1ZFWiqXesq8SlOZ3uW9Om... (the bars are raw/cached/canonical, and the groups on the X axis are min/max/median/90th)
- gerdesj 9y agoIs it really hard to use the whole of my screen? I'm well aware that modern websites have to scale to lots of different screen sizes. My laptop is a 17" job so why the blazes do I only get to see a block of text using the middle third of it? It looks shit. I'd probably have to peek under the lenses of my specs on a smaller screen. I spend far too much time using CTRL + these days.
- rileyphone 9y agoSee http://bettermotherfuckingwebsite.com/ http://bettermotherfuckingwebsite.com/ for the reasoning behind this trend. Line width, namely the number of characters shown in one, is regarded as a prime factor in readability, which I personally agree with.
- OnlyRepliesToBS 9y agoIt's as fast as vendor lock in!
- vemv 9y agoWorth noting that it would be insane to preload content that didn't pass a strict filter akin to that of AMP. Each Google search would download dozens of MBs and produce a significant CPU workload, both resources being precious on mobile. Perhaps it was a communication issue: AMP should have been named/marketed "preloadable pages" rather than "fast pages".
- niutech 9y agoAMP is not about preloading in the first place. It's about the fast CDN. Let's compare any NYT article in the AMP and standard HTML formats: https://www.webpagetest.org/video/view.php?id=180402_16d708376305a3bcdf0026043845ac4b232d0a17&data=1 https://www.webpagetest.org/video/view.php?id=180402_16d7083... - AMP loads much much faster.
- vemv 9y agoNot sure of what does webpagetest is showing evidence of. It could be anything... for one thing, AMP versions are much leaner so naturally they will load fast - even with no dedicated CDN at all. Cloudflare and Fastly should be more than sufficient CDNs? Admittedly, maybe the AMP CDN is an easier one to set up for the masses, but other than that I bet they all have about the same performance.
- wemdyjreichert 9y agoAs someone with limited mobile data, not cool, Google. This after Google created a cell carrier for people who use less data (Project Fi) and want per-gb billing.
- seanwilson 9y agoI think the point of AMP is it gives Google a simple and reliable way to detect fast rendering pages that render well on mobile in a way that can't be easily gamed. When you allow unrestricted usage of JavaScript that's changing page content, loading styles etc. for example, detecting pages like this is more difficult. You can write performant pages without AMP but how would Google reliably detect pages like this? I'm not saying AMP is the best solution and I can see why some developers have objections against it but I think I understand what it's trying to do.
- manigandham 9y ago> Google reliably detect pages like this? The same way it reliable detects the content of the site and everything else. Take a snapshot and keep the latest history. You can easily change the content on a page with javascript so Google still needs to load everything to get an accurate representation. Since there are plenty of tools already (including Google's own) that measure page loading speed, it would be trivial to combine them into a performance score for search rankings. If speed was actually made into a strong signal, major websites would've become as fast as AMP within months.
- seanwilson 9y ago> The same way it reliable detects the content of the site and everything else. Take a snapshot and keep the latest history. Wouldn't benchmarking page speed accurately for all pages on a website for a variety of screen sizes on a regular basis cost significant resources? If it's so easy, why are they not doing this already? What I meant about AMP is that when a page validates as an AMP page you know there's certain things it can and can't do. This makes the task of identifying performant pages significantly easier.
- manigandham 9y agoBenchmarking is just logging the time taken during the process of waiting for the content to load, which is already happening to index the page. No special framework necessary. They aren't doing it because AMP gives far more data and keeps first party cookies because of the cached domain.
- zestyping 9y agoPlease stop saying "performant" when you mean "fast". If you just mean "fast", say "fast".
- soulchild37 9y agoAlternate answer : not as fast as Dan Luu website. https://danluu.com/ https://danluu.com/
- tuananh 9y agoit's a pain to read it on desktop without reader mode. the width is just too wide.
- zokier 9y agoI'd put the blame on crappy user-agents that can't present a readable view by default for a reasonable, semantically marked up document. Arguably that is their raison d'être, and they fail horribly at it.
- Too 9y agoSo nowadays 61 requests per page load is considered an "accelerated" page? Might not be so bad with http2 but still wow. Maybe publishers should start working on that number if they want actually faster web pages.
- emilfihlman 9y agoIt depends on if you pack your data or not, really With simple development on a moderate website you might have a couple of html resources, a few css files and some js files to fetch, not to mention all the media (images, videos and audio). It's easily half that just by doing sane development where you split functionality into files and if your site is media rich it's not surprising at all.
- tscs37 9y agoThe first point in the article is the dead killer of AMP for me. My mobile provider gives me very little monthly data, I've stopped using AMP because preloading the AMP results is eating through my cap, with images disabled. Without preloading, AMP is slower than the non-AMP version of the same webpage with a simple script blocker. And usually causing more traffic too. I hope Google refrains from bullying website owners into making the internet a worse experience for people without 1GB+ data plan.
- ep103 9y agohow do you disable it?
- tscs37 9y agoI tap "Request Desktop Page" when I use google search and I mostly rely on search engines that don't pull the AMP crap at all.
- niutech 9y agoNo. AMP is much faster even without preloading. Here is an example of a random article on CNN: https://www.webpagetest.org/video/view.php?id=180402_4583919a10f9cadcd56a6aacb67e6033c904cd34&data=1 https://www.webpagetest.org/video/view.php?id=180402_4583919...
- tscs37 9y agoThis is not my experience. AMP is consistently slower than normal desktop pages or mobile pages when offered. I've measured this myself on my own phone countless times. CNN is also probably one of the worst offenders, so the example is rather cherry picked nor does it represent my usual browsing in any way.
- buro9 9y agoYou might not realise how much AMP you come across every day. Your web browsing isn't it at all. If you are on an Android phone go install NetGuard and take a look at the logs. There are a few domains that come up for almost every app: 1. graph.facebook.com 2. graph.accountkit.com 3. .crashlytics.com 4. .ampproject.net 5. .segment.io AMP Project is up there. The majority of the apps on my phone now do their content via WebView + AMP. In this AMP have found their niche.
- waytogo 9y agoStopped using AMP. Created a site in pure AMP. All competitors didn't use AMP then (1 yr ago). My site was the fastest, didn't have any ads, was the lightest, the most beautiful, had the best UX flow. SEO-wise my site still doesn't list on the keywords which are in H1 and the page title but all the crappy, non-AMP, megabytes big slow-loading, ads-heavy competitor sites are still in the top ten SERP. Guess that even Google stopped giving AMP sites any special rank power except they are news sites (then you will see them probably in the carousel but only if they are accepted with Google News).
- Guest9812398 9y agoIsn't it in Google's best interest to list the ad heavy sites first? They don't receive any commission sending users to your ad free site, but they'll earn 32% of AdSense profits from your competitors. Now, I don't believe that is actually occurring, but it's one of the many ways that our interests and Google's interests do not align.
- whyagaindavid 9y agoI built a simple bash/javascript to get the AMP URL for a given URL, did reduce my data usage by tons. Look here: https://developers.google.com/apis-explorer/?hl=en_US#p/acceleratedmobilepageurl/v1/acceleratedmobilepageurl.ampUrls.batchGet https://developers.google.com/apis-explorer/?hl=en_US#p/acce... curl -X POST -H "Content-Type: application/json" -d "{urls: ['$1'] }" https://content-acceleratedmobilepageurl.googleapis.com /v1/ampUrls:batchGet?key=YOUR_AMP_API_KEY For android app use: public static String GET(String url){ String result = ""; String ampString = "https://content-acceleratedmobilepageurl.googleapis.com/v1/ampUrls:batchGet?key=YOUR_AMP_API_KEY"; HttpURLConnection conn = null; try { URL ampurl = new URL(ampString); conn = (HttpURLConnection) ampurl.openConnection(); conn.setReadTimeout(10000); conn.setConnectTimeout(15000); conn.setRequestProperty("Content-Type", "application/json"); conn.setRequestMethod("POST"); conn.setDoInput(true); conn.setDoOutput(true); JSONObject jsonObject = new JSONObject(); jsonObject.accumulate("urls", url); OutputStream os = conn.getOutputStream(); os.write(jsonObject.toString().getBytes("UTF-8")); os.close(); InputStream istream = null; istream = conn.getInputStream(); InputStream in = new BufferedInputStream(istream); if(in != null){ result = convertInputStreamToString(in); } } catch (Exception e) { Log.d("News exception", result); }finally { // Close Stream TODO // and disconnect HTTPS connection. if (conn != null) { conn.disconnect(); } } private static String convertInputStreamToString(InputStream inputStream) throws IOException { BufferedReader bufferedReader = new BufferedReader( new InputStreamReader(inputStream)); String line = ""; String result = ""; String id = ""; String ampUrls = ""; while((line = bufferedReader.readLine()) != null){ result += line; } inputStream.close(); try { JSONObject jsonObj = new JSONObject(result); // check if jsonObj has ampUrls string - how to do it? if (!jsonObj.isNull("ampUrls")){ JSONArray contacts = jsonObj.getJSONArray("ampUrls"); for (int i = 0; i < contacts.length(); i++) { JSONObject c = contacts.getJSONObject(i); id = c.getString("cdnAmpUrl"); } } } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } return id; } //end of convertInputStreamToString
- madeofpalk 9y agoHeh. This reminds me of a recent pet peeve and observation of mine: progressive web apps are not faster. The Twitter Lite PWA, arguably the 'flagship' PWA ("developed in partnership with Google"), takes longer to display tweets for me than regular desktop Twitter.com, and the old 'static' mobile twitter site (which loads INSTANTLY[1] you can only get with user agent trickery) [1] Just did some testing. According to Chrome Dev Tools, old Twitter Mobile displays tweets in 124ms. PWA Twitter takes greater than 1.4s (it stopped recording screenshots), 2s according to a screen recording https://gfycat.com/PlushThornyIcefish https://gfycat.com/PlushThornyIcefish
- Veen 9y agoPWAs aren't literally faster — caching aside, they load the same data and it takes the same amount of time over the same connection. But there is a percieved performance boost if the PWA uses caching and preloading intelligently. The first load might take a little longer, loading the first tweets will take just as long, but scrolling through the timeline should be faster and page transitions can be almost instantaneous.
- madeofpalk 9y agoOkay so this actually goes straight to the heart of everything that's wrong with the web development communities obsession with PWAs. The technologies behind PWAs are fine, but people need to learn how to properly assess these buzzwords and learn if their suitable for the particular use cases of their site. The main use case of Twitter is to look at your timeline, yet Twitter Lite somehow screwed that up and made it slower, even on subsequent loads. Not only that, the particular implementation provides arguably a worse experience, doing things like showing three different 'loaders' on the path to the timeline (Twitter icon 'splash screen' (wtf, I thought this was all preached?), spinner for the whole 'app', and then spinner for the timeline). Reminds me a lot of people's obsession with Webpack and code-splitting - I'm sure a huge majority of projects will find >75% of their JS bundle weight being their dependencies.
- niutech 9y agoIn case of Twitter PWA, it loads twitts asynchronously, so they seem to load longer, but the whole PWA loads much faster in total: https://www.webpagetest.org/video/view.php?id=180402_08c5318335d348c5ce774885e87d9d9947cdb174&data=1 https://www.webpagetest.org/video/view.php?id=180402_08c5318...
- gorhill 9y agoOne detail which I feel must be mentioned: if you block `ampproject.org` by default -- directly or by blocking 3rd-party javascript by default, -- you will be "punished" with a 8-second delay before the page becomes visible. This is an entirely artificial delay, implemented through an inlined style CSS animation in AMP-based pages: animation:-amp-start 8s steps(1,end) 0s 1 normal both} @keyframes -amp-start{from{visibility:hidden}to{visibility:visible}} I can't see any good reason for such delay. If you are not aware of this 8s delay, you might be misled into thinking the page is broken and that `ampproject.org` is really needed, while the page renders just fine without it, except for the delay. Example: https://ampbyexample.com/ https://ampbyexample.com/
- emilfihlman 9y agoOkay this is a pretty bad thing to do.
- Ajedi32 9y agoI'd assume that's probably done to prevent FOUC while it's waiting for the JS to load. What do you get if you override that style?
- gorhill 9y agoIf using uBlock Origin, you can try the example page with that cosmetic filter: ampbyexample.com##body:style(animation: none !important;) One thing for sure, the result is much more pleasant than having to wait 8 seconds if one does not want to un-block 3rd-party javascript from `ampproject.org`.
- lgats 9y agoI suppose webmasters could add the inline css body{animation:none !important;} On mobile so I haven't had the chance to test
- gorhill 9y agoI should have included this in my first comment: this is a requirement from AMP to include the animation[1]: AMP HTML documents must contain the following boilerplate in their head tag. [...] <style amp-boilerplate>body{-webkit-animation: ... [1] https://www.ampproject.org/docs/fundamentals/spec/amp-boilerplate https://www.ampproject.org/docs/fundamentals/spec/amp-boiler...
- kmfrk 9y agoThe most infuriating part of AMP for me is that I can't count the number of times I'd read an AMP version of an article, and graphics in it were just plain missing without any heads up. Why newspapers and the like would gimp their own work like that is beyond me.
- kyberias 9y agoMaybe just once tell the readers what AMP stands for.
- niutech 9y agoAMP stands for Accelerated Mobile Pages.
- thrownaway954 9y agoit's funny how so many people use to ridiculed ColdFusion and Asp.Net WebForms for "re-inventing" and "polluting" HTML with their custom tags and server components respectively. This is exactly what AMP is.
- stevew20 9y agoDon't use AMP... Aweful for everyone involved, except Google.
- gregoryjenny100 9y agoDo you want to hack into your spouse's phone remotely without touching his or her phone You can hack into any devices to access facebook , whastapp , text mssg , call logs etc to know who they have been talking to and if they're cheating on you remotecyberhacker@ gmail com he's the fastest,reliable and cost-effective you can ever come across cos his name has never been SOILED , in shrot....he's the best working for me . text/call ; + 1 3 4 7 89 93 01 7 whatsapp ; +1 267 52 6 53 4 6