Ads? Flash? JavaScript animations?
Let's face it, it's not going to be the text, is it?
Software developer Santeri Paavolainen says the code powering today's websites is taxing browsers so much, it's having a significant impact on power consumption. The programmer came to that conclusion after a casual examination of news sites including the New Scientist, the BBC, Forbes, The Guardian, and The New York Times, as …
Phone?
The article says 2013 Retina Macbook Pro. Wouldn't fancy holding that up to my ear.
A retina laptop screen (2560x1600) will have a lot of pixels to animate. It would be interesting to see if the same ratios between power consumption of website renderings applied to a bog-standard 1388x768 laptop and across different browsers.
"would be great to see this as a little browser add-on, how power hungry is this website. scored 1-100"
It would be a good idea, but it may be difficult to get accurate readings unless the OS actually makes power consumption figures available to developers. I know OSX (recent versions) tracks this, but I don't know if the readings are made available to developers through an API. I don't know if Windows or Linux even track this, let alone make it available to developers. The browser would also need to enable access to this information but would also need to track what it is doing in each tab. For instance, looking purely at the power usage by each process (which is what the OS would see), you would not get accurate power usage information for a largely text based site if you had a browser window or tab open in the background showing a flash movie.
Don't get me wrong. This info may already be available via the browsers. If it isn't, it should be.
http://www.washingtonpost.com/lifestyle/style/the-old-suburban-office-park-is-the-new-american-ghost-town/2015/07/20/b8e7653a-1f6e-11e5-bf41-c23f5d3face1_story.html
It has a number of 7000 pixel wide photos in the page with some javascript stuff resizing the images to suit resolution/dpi of page. Eats around 800Mb on Firefox which then crashes on Linux, spanners MSIE and Chrome on the Atom based 2Gb RAM Windows 7 client I use at work - system becomes unresponsive and hard drive is on all the time. According to comments on another forum, it spanners Android based phones as well. I resorted to links in a terminal to actually read the 1000 words!
PS: lots of moderation happening are we being spammed?
Coat icon: off out in the rain for the lutz
Using Firefox; if you use the Request Policy plugin and NoScript (of course) then you can see a list of third party content that the page is trying to pull in as well as the third party scripts.
As an example, reading an article in The Independent newspaper website right now, it tries to pull in third party content from 25 other sites and 25 scripts from those sites. I block them all and can still read the articles.
Sometimes you get a blank space in an article and that can be filled by allowing some obvious content delivery network site, if you really want to. Then of course, allowing just one third party content site gives you an entire new set of third party scripts trying to get in as well as a new set of third party content trying to get in. It's a surreal jungle out there.
I've got to the point where, if i'm keen to see stuff, I give temporary permission for all third party content but close the tab if it needs third party scripts to work.
As someone earlier mentioned, I've had sites crash my browser under Linux and they will never be visited again.
@frank ly
Never actually had a *shutdown* on Linux other than thermal runaway when I had a problem with acpi and fan control on Ubuntu 5.10 or something. Might be worth checking the temperature as the computer tries to load the page?
Trying to load my death-test page (linked above) results in Firefox thinking about it for a bit then deciding to quit. With noscript you can actually load the page but the memory use is very high (1Gb RAM in the netbook).
"Addendum/Correction
Now I remember: Certain sites didn't just crash my browser, they caused an instant system shutdown. This was running Linux Mint 13 with MATE on and old laptop. Does anyone know how that can even happen"
Back in the day I saw web sites and code that crashed routers and modems, anything is possible through bad coding and / or evil genius.
I am the same as a lot of you, out went the black list and in with the whitelist. the web is turning into a shitty ad infested cess pit.
Until fairly recently I would use RequestPolicy and hand craft policies to get rid of social networks, 'elsewhere on the web', and so on like an idiot but now when there are sites which bring in 70 (according to the ad blocker's icon) off-site scripts and hang waiting if one of them goes down which is a fairly regular occurance if there are 70, it's ad blockers all the way.
And how this set up not be subverted? Last year El Reg was peddling WhatsApp for PCs which was a scam but they probably had no idea that that was what they were pushing.
If they put a "please please disable your ad blocker" message which I now have on by default to navigate the treacherous waters that are the Internet I might relent if they're not loading a tonne of off-site stuff.
They brought it upon themselves.
Towards the bottom (bad) end of the list, I suspect - so many ads, some of them animated or trying to pop up in front of the text. Goes through phases depending on who's advertising at the time - seem to remember HP ads were awful a few months ago. Actually had a few genuine popup ads on the Reg a couple of days ago too - closed my browser and went to get my news elsewhere!
El-Reg was the reason I got ABP, I dont mind adverts, just keep them responsible. It was when they started filling the entire background and you couldnt click on the sides to scroll down, that was when I got irritated enough to do something.
Considering It's El-Reg they should think about offering a Ad-free version.
>you couldnt click on the sides to scroll down
Now this is the sort of thing that really gets my goat. Anything that interferes with the conventional and most basic methods of navigating around the page (arrow keys, mousewheel/touchpad scrolling, tabbing -- I've even had Home/End/PgUp/PgDn fucked with on occasion) is bad enough when the site's *own* webmonkeys do it, but when piped-in ads are responsible my contempt-o-meter crosses the red line. You come away with the feeling that they aren't all that bothered whether you actually, I dunno, *read* what's on the page or anything wacky like that.
From a dev POV I won't even use jQuery if the efficiency gained doesn't justify the bloat added. Dear ghod, I'm glad they made it modular - if it was monolithic I think I'd never use it.
For those hankering for an FF addon that profiles power usage, it's worth looking at YSlow (dependent on Firebug, which has a couple of its own profiling widgets to boot) as the reasons for a page loading slowly are oftentimes not entirely unrelated to the reasons for your computer shitting its lungs out of its ear in the process.
(However it should be noted that those addons themselves, when activated, do exacerbate such problems a bit in their own right.)
This post has been deleted by its author
I blame the current obsession with Single Page Web Applications, JQuery and image bombardment - all in the name of fancy design and efficiency. In reality, you have an irritating design that doesn't work on any platform, continuous loading from multiple JQuery scripts and a flat battery as the device goes mental trying to render it all. The amount of on the fly loads and calculations and ad pingbacks is just ridiculous. Kickstarter is another culprit and just kills the battery on my tablet.
NoScript, Ad-Block and binning all browser plugins (especially fucking flash) is pretty much mandatory these days
That's not actually the website killing the battery - it's a protection mechanism built into your tablet to power it down before you've had time find your credit card and blow a wad of money on some improbable project.
"I feel like someone just set up the entire vendor hall from an awful tech conference in my living room."
http://blog.lmorchard.com/2015/07/22/the-verge-web-sucks/
Link via another well known technical forum - the one with orange.
The blog post author's use of web developer tools in Firefox coupled with the lightbeam extension have given me an idea for Maths teaching next year...
The coat: quitting while I'm ahead, thanks all.
Being an unreconstructed Opera 12 user, I take advantage of the built-in content blocker. The Graun site doesn't seem to know about that, or at least doesn't complain about it. But the latest redesign is a clusterfeck of the highest order in Opera on my 1024*600 netbook. You can't scroll to the bottom of the page without it spontaneously scrolling back up again, and it insists on stealing valuable screen height with worthless non-scrolling banners top and bottom. At least, that's how it used to be, until I tried turning off Javascript as an experiment. I left it switched off. The usability is improved by several orders of magnitude.
-A.
@Roq D. Kasba
Thanks for the link, but having read it, I'm in need of some kind person to explain it to me. It seems to me that it's saying that ad-promoters WANT to be blocked by Ghostery. And are paying Ghostery's creators to tell them that their ads are being blocked. Shurely shome mishtake? I must be misunderstanding summat somewhere.. - aren't I?
@Roq D. Kasba
If it gives the ad and tracking reptiles an inkling of the degree to which they're blocked and where without spaffing user data it's probably a good thing, IF (a very big if) they correctly interpret the message and use it to consider how they can tone it down to the point the web is usable without a small software arsenal.
I won't be holding my breath, since for me that means static ads (preferably text) with a reasonable (user not industry version) max ad/content ratio, properly policed for malware, no flash, with no tracking / beacons, no trading of user data, no clickbait or 'see also', etc etc. There probably is a way to make ads tolerable in at least a few contexts, and if this helps them understand the degree to which they are currently making things worse for themselves, then maybe some good comes out of it.
The article doesn’t have much detail on the actual causes of excessive power consumption, but some of it must include over-use of inefficient JavaScript and CSS, as well as the usual suspects of Flash and, well, more Flash.
I’ve been telling people for years that there’s both a business case and an ecological case for writing clean code and not wasting too much effort supporting Legacy™ Browsers.
Roughly, that means leaving IE with what works well enough without excessive polyfills, and not bloating your site with libraries which, despite their qualities, are often used to perform a job done more simply without.
My local newspaper's website is dire (Cambridge News). Well, I never knew it was dire, as I take the usual precautions, until I heard people complaining about it and I saw it how the designers intended. Ouch!
I use an old, low spec laptop running Linux and Firefox and notice that if I leave a facebook page on screen the computer runs hot and the fan keeps going, but if I leave El Reg open instead (or most other websites), the fan stops. As I don't have flash installed on this machine and use Adblock+ I can only assume it is related to facebook refreshing parts of the page using Java Script. Facebook won't work anyway without this enabled. It continually updates the notification area and indicates which of my "friends" are online. Must be quite a power gobbler.
<snip>
"Must be quite a power gobbler."
That made me smile. I had visions of the eighties, shoulder pads and lots of hair and a certain secretary who .....
For those of you running Firefox, have a look at lightbeam and see what it tells you about your favourite sites.
I used Adblock+ to block all the frames down the right hand side of the Facebook page. So all the chat, notifications, game page links etc.
Also using the mobile pages on a desktop work very well. (I do that with The Reg quite often :-) ).
I also run Ghostery.
I don't seem to have any issues with CPU utilisation of 'idle' pages now, and I typically have around 10 tabs open at once. (Mostly work related, but there is FB, gmail, outlook etc sat in the background (Chrome)).
Ghostery + ADP = Reasonably pleasant browsing experience. :-D
Wouldn't be too shocked to see if some of this was down to JS polling for data - a lot of places are still using setInterval (okay, I do too for internal stuff) rather than websockets pushing updates. I imagine that hitting a page every x seconds, along with the browser processing the response, will ramp up battery use.
A lot of JS development is bloody lazy too (again, guilty at times myself) with a reliance on jQuery rather than using native methods because it's easier, so loading up libraries and the extra processing from jQuery won't help.
Single/Minimal Page Applications should be *less* intensive, but that all depends on the person coding the damn thing...
The JavaScript framework du jour seems to be AngularJS. Unlike JQuery, where the script is essentially driving the application in response to browser events, AngularJS seems to use some kind of continuous polling. It's a pleasure to work with: you can bind HTML tags to script variables declaratively, and see them all updated when the value changes, but I can't help wondering what kind of overhead this incurs. What's more, the preferred AngularJS architecture involves loading everything into one single-page application, so you'll have a substantial memory footprint as well as a busy processor.
"Software developer Santeri Paavolainen says the code powering today's websites is taxing browsers so much, it's having a significant impact on power consumption."
It's a common observation that visiting certain websites or running particular applications causes the fan to rev up.
I got out of the habit, but for a long time (probably owing to my small-time developer mindset) I always used to keep a task-Manager running in the bar. It's revealing to see when that processor usage start to rise (and processor usage is likely a reasonable proxy for power consumption.)
...are those bloody stupid but increasingly common sites that insist to open with a full-page full-motion 4K video loop in the background. Guess what that does to bandwidth / CPU load / power consumption (especially if I don't switch to the relevant tab right away after opening it, so it gets to play in the background for eternity - and before anyone says "it's not running while not in focus" I hope you're aware it's perfectly possible to fully watch any number of Youtube videos in parallel without actually seeing any of them play...)
YouTube has caught me with that. Watched a short video a while ago, only a few minutes long and got up to make some lunch just as it was finishing. In the meantime the screen saver kicked in and I didn't return to the computer for the rest of the afternoon. Moved the mouse in the evening and discovered YouTube still playing and gobbling bandwidth showing videos of its own choosing to... nobody. Damn that "automatic play next" feature and its default to yes.
NYT, Facebook, Twitter - they open-source a lot of their bloatware and frontend devs eat it up. It's 'best practice'. Underscore, Backbone, Bootstrap, Coffeescript(?), maybe AngularJS (notorious hog), and layers on top of all these, and soon WebComponents.
Seems like a good idea at first, enabling modular/functional programming in JS, but the temptation to overleverage it is irresistible.
P.S. - installed NoScript for the first time in 5+ years. Renders 90% of sites unusable but so be it. This is getting ridiculous.
Looks like each site was only tested once. Seven measurements for 30 seconds after the page was loaded but I could only find that the page was loaded one time. So it's entirely possible a background task like indexing for the spotlight search or an hourly task impacted the result for the NYT and made it look like it was the coding. Loading the test five or ten times for a reloaded page (ideally restarting the browser and loading the page fresh from a blank page) would smooth out those events. I'm not saying that it isn't the NYT but with a single data point it is hard to make assumptions.
While there was a good effort to try and stop other processes from running in the background, such as turning off Time Machine, there are many behind the scene tasks and jobs that can't be turned off and can impact with the results.
It might have been better to start the Mac in "safe" mode where a lot of these extensions aren't started. Then create a new profile in Firefox with no extensions and have it start up with a blank page. For each page to test start the browser, go to the page, wait until it loads, run the measurements, and quit the browser. Repeat the test until you get your five or 10 samples. Move onto the next page to test in the same manner.
Yeah, I have not run powertop to measure my actual power use, but I will go to some sites and firefox and Xorg are just chugging CPU time with nothing visible happening onscreen. I speculate some banner ads may have horribly written Javascript that (despite no actual animation) redraw the banner either as fast as possible or at some high frame rate. I'm interested into looking into if firefox has any options to throttle this naught javascript.