Slashdot Mirror


Google's Effort To Speed Up the Mobile Web (ampproject.org)

An anonymous reader writes: Google has officially taken the wraps off its AMP project — Accelerated Mobile Pages — which aims to speed up the delivery of web content to mobile devices. They say, "We began to experiment with an idea: could we develop a restricted subset of the things we'd use from HTML, that's both fast and expressive, so that documents would always load and render with reliable performance?" That subset is now encapsulated in AMP, their proof-of-concept. They've posted the code to GitHub and they're asking for help from the open source community to flesh it out. Their conclusions are familiar to the Slashdot crowd: "One thing we realized early on is that many performance issues are caused by the integration of multiple JavaScript libraries, tools, embeds, etc. into a page. This isn't saying that JavaScript immediately leads to bad performance, but once arbitrary JavaScript is in play, most bets are off because anything could happen at any time and it is hard to make any type of performance guarantee. With this in mind we made the tough decision that AMP HTML documents would not include any author-written JavaScript, nor any third-party scripts." They're seeing speed boosts anywhere from 15-85%, but they're also looking at pre-rendering options to make some content capable of loading instantaneously. Their FAQ has a few more details.

17 of 95 comments (clear)

  1. I hate mobile web pages by Anonymous Coward · · Score: 5, Insightful

    They shrink down the content, but keep the ad network bullshit huge in comparison.

    Mobile web without that rubbish is almost instant even on a struggling 3G connection. Hell, even regular web pages with junkware scripts blocked are quick-as.

    You're looking in the wrong place, google.

    1. Re:I hate mobile web pages by davester666 · · Score: 2

      Yes, this is just trying to serve the existing ads and tracking crap faster.

      Ad/Tracking Blocking really is the only way forward.

      --
      Sleep your way to a whiter smile...date a dentist!
    2. Re:I hate mobile web pages by Anonymous Coward · · Score: 2, Interesting

      Yep, with JS off, mobile web is really slick. Slashdot redirects to that page complaining I have javscript disabled saying to use the desktop site really fast. Go Mobile web! And you press the desktop site link, and the next internal link you hit puts you back at the stupid page saying to use the desktop version... If you are going to both auto-detect my mobile user agent and my lack of JS support please don't auto redirect to a useless page every time I click any internal link.

      I think I should just make my phone always claim to be a desktop browser: at least 3 sites I use have mobile versions that are pretty much unusable with desktop versions that are fine.

  2. Google seems to be avoiding the real problem by Anonymous Coward · · Score: 5, Interesting

    The performance problem isn't with mobile web, it's with *Android* web. Apple devices are approaching desktop-level performance on js-heavy pages while android devices are getting worse and worse. A considerable contributor to this problem is the trend for android devices to show more cores in them, not faster ones. JS is still single-core after all.

    Interesting comparisons here: https://meta.discourse.org/t/the-state-of-javascript-on-android-in-2015-is-poor/33889

    Disclaimer: I am an andoid fanboy.

    1. Re:Google seems to be avoiding the real problem by davester666 · · Score: 4, Insightful

      The problem IS mobile web. They actually try to cram more tracking JS crap on pages, with auto-playing video [at least they still generally serve flash to desktop, so blocking Flash works to kill those ads]. It's ridiculous.

      --
      Sleep your way to a whiter smile...date a dentist!
    2. Re:Google seems to be avoiding the real problem by ET3D · · Score: 2

      Thanks for the link. I'd mark your comment up as informative if I could. :)

      Still, comparing to iOS devices is like saying "there's no performance problem for games on laptops; my Alienware laptop runs them well." Android devices are a lot more varied than iOS ones, and it'd be nice to have web pages work well on a sub-$100 device and not just flagships. I don't know how well old iOS devices cope with pages either. Last I heard a comment from an iPhone 4 user it was that the phone was very sluggish. So just because web pages work well for someone who recently spent $600 and up on a phone doesn't mean that it's not worth optimising them.

  3. Won't fly with companies by Todd+Knarr · · Score: 5, Insightful

    This'll be great for individuals, but companies won't accept it. The first problem is that ad networks won't accept the limitation, so any site that shows advertising will have to eschew AMP. The second problem is that companies use Javascript frameworks so heavily in their Web design that they won't be able to just drop it and go back to static HTML/CSS for their sites. If they were willing to, after all, Google wouldn't've seen such a need AMP in the first place.

    I think the same results can be achieved by three things:>

    1. Strip advertising down. Ads are the biggest things I find slowing mobile Web pages down as the ads do so many things to keep content from being accessed until the ad's been seen and dealt with and fetch so much stuff from so many remote servers. Minimize the number of ads and make them as simple as possible.

    2. Stop using images for layout and convert to using CSS instead. Yes you lose the ability to do fancy brand-specific artwork on headers and separators and such, but you know what? Most users don't care about those things.

    3. Stop using dynamic layouts that load the entire page and then make changes to it that alter it to it's final layout. Just lay things straight out so the browser can render stuff as it's loaded. Specify sizes for images, drop the "Tap to read the rest" buttons that hide the bulk of the content (but still require it to be loaded before the page can render), that sort of stuff.

    Easy way to do this: one of your test machines runs Windows XP on hardware with a 500MHz CPU, 256MB of RAM, an unaccelerated graphics card with 2MB of video memory and a 56K modem (or 115200bps serial link) for network connectivity. If your site performs decently on that, it'll be good on any mobile device.

    1. Re:Won't fly with companies by Ol+Olsoc · · Score: 2

      This'll be great for individuals, but companies won't accept it.

      Then again, they won't accept your solutions either.

      The web has a serious problem. The web is broken.

      The present day over-commercialization of the web, with tracking and intrusive ads, and making search engines approach worthlessness; and as ad-blockers and script blockers are breaking out of the province of nerds, and onto regular folks machines, is showing the "target's" growing rebellion.

      And even though Joe Sixpack might not understand the tracking, he does understand that his webpages are taking a long time to load, and up pops an advertisement for something he already bought. So Joe's geeky friend "who know's this stuff", tells him about the adblocking and noscript add-ons, maybe even installs a hostfile. And Joe is happy. Tells all his friends, and its off to the races.

      I know this because I'm the geeky friend, and I've been installing adblockers and noscript, persistent cookie killers and even a few hostsfiles on friend's computers. Happy people, who wern't so much anti-ad, but just wanted acceptable performance

      Google's well aware of the brewing web revolution, and trying to figure out what to do about it. I already have.

      --
      The shepherds did so well protecting the flock that the sheep no longer believed that wolves existed.
  4. ads are the problem by ljw1004 · · Score: 4, Insightful

    Ads are what slow down the mobile web. Eliminate them and it runs blazingly fast.

    Reckon you can do that, Google?

  5. Why would I help Google with 'open source'? by hughbar · · Score: 2
    Google which dominates the search/ad market can do this by itself, without my help.

    Also, looking at the analysis here: http://www.cnet.com/news/world... Open source is simply part of its strategy for distributing software that will help it sell more advertising

    This is part of a general trend that I call 'open season', basically big companies persuading naive people to do their work for nothing, under the banner 'open source'.

    --
    On y va, qui mal y pense!
    1. Re:Why would I help Google with 'open source'? by hvdh · · Score: 4, Informative

      Just yesterday I measured data use of Germany's biggest gossip news site (bild.de) on my smartphone (Android 5.1 with stock browser), cached and uncached (browser cache cleared, browser restarted) with and without ad blocking (using AdFree host list). The phone was on Wifi / DSL.
      Here's the result:
      uncached load (first visit) with ads: 2.4MB data, 26s (!) until the display goes from white to some content
      uncached load (first visit) without ads: 1.7MB data, 11s until the display goes from white to some content
      cached load (second visit) with ads: 272KB data, 2s
      cached load (second visit) without ads: 45KB data, 2s

  6. Related article by mork · · Score: 3, Informative

    NY Times had an article about the cost of mobile ads, the article also had some interesting data about load-times and how much data was javascript, videos, images, embeds etc.
    http://www.nytimes.com/interac...
    Posting as its related to the efforts described above

    1. Re:Related article by hvdh · · Score: 2

      This article is a good start. There are two things were it could improve.
      1) They measured the site's total data size, but not the load time. Load time was estimated = size/bandwidth, ignoring latency, parsing time and data dependencies. Actual load time should be (much?) higher.
      2) Strangely, they did not account for http compression, so they cannot have measured actual traffic size. This implies they did only measure uncached loads. Most people visit a news sitte more than once, so cached loads would be more relevant. On a cached load, scripts, design elements and other stuff does not need to be reloaded, only the advertisiing. This makes the overhead for ads relatively much larger. On the German news site bild.de, a cached load is 17% content data and 83% advertising and tracking.

  7. Re: Sorry. Not gonna work by nullchar · · Score: 4, Insightful

    Chrome developer tools already give suggestions for improvements. Experienced developers know how to learn and thus improve their sites. I don't see wide adoption here unless built into major content management systems.

  8. The web has outgrown HTML 15 years ago by Qbertino · · Score: 4, Insightful

    The problem is HTML. HTML is for documents, not the living application-like multimedia canvases we've all been using since 2000.
    Flash was pointing in the right direction, but it was proprietary and Adobe screwed it up.

    Simply setting up a usefull canvas layout is pure torture in HTML, with tons of libraries, JS and CSS hacks, just to get the thing sort of running.
    Ginormous hacks such as Googles Polymer try to pry some sort of sanity from this plattform with a huge effort and enable modern age development, but the simple fact is, HTML is at least 15 years behind what Flash or similar approaches had to offer.
    And don't even get me started on building a usefull web-application with useful clientside logic without a bizar convoluted mess of tie-ins and callbacks.

    Example: This multimedia website in Flash is 16 years old. That is sixteen years . ... It's from freakin' 1999!!. It's parely possible to make such a thing with todays HTML, without becoming an all-out programming and browser expert and spending a forbidding amout of time getting it right.

    HTML, CSS and client side logic - wether with JS or something else - need a massive redesign for modern day multimedia and multi-screen requirements. When that happens, performance will be sane again. I expect web components and web assembly to get us back on track a little, but that's gonna take at least another five years.

    Bottom line:
    The web is a mess, and frickin' HTML and the ignorant smelly boring nerds that still push it as a cure-all are to blame.

    Disclaimer: I'm a senior web-developer with focus on FOSS technologies.

    --
    We suffer more in our imagination than in reality. - Seneca
    1. Re:The web has outgrown HTML 15 years ago by sootman · · Score: 3, Insightful

      > The problem is HTML. HTML is for documents, not the living
      > application-like multimedia canvases we've all been using since 2000.

      That's half the problem. The other half is people wrapping damn articles in "application-like multimedia canvases".

      Why is 75 kB of HTML wrapped up in a 9.5 MB page? That's literally over 100x larger than it needs to be. Hey Google, I think I just discovered a way to speed up mobile browsing 100x. Will AMP do that? If not, call me.

      --
      Dear Slashdot: next time you want to mess with the site, add a rich-text editor for comments.
    2. Re:The web has outgrown HTML 15 years ago by cardpuncher · · Score: 4, Insightful
      If you want an app, write an app.

      I had a look at your 16-year-old example. Frankly, I'd have quit after the "Now Loading" and "Click to Start" and never got as far as skipping the pointless "intro" as well if I hadn't felt obliged to go the extra step in the interests of exploring your argument.

      I just want the information, particularly on a mobile device. I don't care about the "design". I don't care about "immersive". I don't want to waste my time with pointy and clicky things that shoot around the screen for no apparent reason. That's what *you* want. And that's just as bad as what all those ad-merchants want - it's just crap that gets in my way and wastes my time.