Live data from Hacker News

How fast is AMP really?

timkadlec.com

101–110 of 167 posts

Re: How fast is AMP really?

#101
You 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.

Re: How fast is AMP really?

#102

Earlier quoted context omitted.

You 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.

Not just America uses dot as the decimal separator, see: 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).

Logged in to my AliCloud account and saw a bill for 18.021 USD. Almost got a heart attack...

Re: How fast is AMP really?

#103

Earlier quoted context omitted.

AMP tech leads especially. For a quick glimpse you can read this: https://amphtml.wordpress.com/2018/03/08/standardizing-lesso...

Where does this say AMP wasn't motivated by speed? From the link: > We started working on AMP because we were seeing the mobile web feel clunky and slow, falling behind the tightly-integrated, highly-optimized user experiences that walled garden platforms can offer. Yet we also knew there wasn’t a fundamental technology problem: you could build great experiences on the web with the right knowledge, resources, and man…

I was actually just pointing out the "There are employees there who probably buy the idea that it's motivated by speed" :)

If the project was motivated by speed, it:

- wouldn't be implemented in a way that breaks Google's own speed guidelines

- would be implemented in a way that favours speed, not placing in search and inside Google's ecosystem

- would be open to input from the web community, not in through an entirely opaque process inside Google

Re: How fast is AMP really?

#104
Stopped 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).

Re: How fast is AMP really?

#105
I 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/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 

Re: How fast is AMP really?

#107
post #2

A 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.

>> 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?

No, 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.

Re: How fast is AMP really?

#108
post #106
post #10

Answer: not as fast as the D lang forums. https://forum.dlang.org/

Truly impressive is https://www.gov.uk/ A government site, lightning fast, try the search! No bullshit design.

Yes, I'm always impressed when I have to deal with it. Truly amazing to find such competence in a gov site.

A lot of that is done in the open, too.

https://alphagov.github.io/

Re: How fast is AMP really?

#109
post #68

Earlier quoted context omitted.

Make performance (not AMP) matter in search rankings and websites would immediately start getting faster.

I 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)

Speed 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).

Re: How fast is AMP really?

#110
post #9

Earlier quoted context omitted.

Yes, except how do you propose to implement caching and stripping out the ad junk without AMP?

HN is seemingly incapable of rationally discussing AMP. AMP solves a very real problem, which is that our web stack is open to enormous abuse because it is sometimes too powerful for its own good. While we could make simple HTML that is as fast ( of course we can), the reality is that we don't, and many don't often for tragedy of the commons reasons. And the counter-argument that search rankings should just favor thi…

> many don't often for tragedy of the commons reasons.

Google are some of the major culprits driving the creation of an unpleasant web experience loaded with tracking and advertising cruft, and now they're pushing this alternative format to supposedly fix the damage they wrought. That's why people are salty about AMP.

It's an imperfect analogy, but imagine if some company had torn up the roads near your house by driving their heavy cargo trucks over it, and now you're irritated by the potholes, that same company says, "Great news! If you just buy our special tires and shocks and install them on your car, you'll have a smoother ride with fewer bumps from potholes!"

Post reply on HN