Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Building a more power-efficient browser (windows.com)
222 points by ingve on June 20, 2016 | hide | past | favorite | 102 comments


Honestly I'd be happy if they could stop Windows 10 from turning my laptop into a hair dryer randomly while it is otherwise entirely idle. The thing is sitting there doing nothing, suddenly the fan will start roaring and the CPU utilization spikes.


Apparently Windows 10 likes to use idle time to test the memory:

http://superuser.com/questions/635837/high-cpu-load-from-sys...

In my desktop it was causing it to rev up the fan when it was idle for a few minutes.


Seriously why on Earth does this happen? Even if Edge ends up being more power-efficient the rest of the OS (Windows 10) is going to ensure that I will get no more than 3 hours of battery life on my laptop.


Windows update via svchost.exe has been the problem on the machines I support. I randomly eats 100% of the CPU for minutes at a time.

http://www.wintips.org/how-to-fix-svchost-exe-netsvcs-memory...


If I don't use a specific PC for around a week, it's basically unusable on startup. CPU/HDD are at 100% for around 20 minutes, then every now and then they spike again.

I dunno what the hell Microsoft are playing at, but I'm in the process of switching all my computers to Linux.


Well, that's one thing you can be sure will never happen with Linux/*BSD. If some service bothers you, you can always reschedule it or turn it off. Good like with "phone home" updates in Windows 10! (unless you are an enterprise user, and even then...)


It's a poorly programmed code of the Update subsystem, and I've located the problematic function spending all of the CPU time:

https://news.ycombinator.com/item?id=11267019

     wuaueng.dll!CUpdatesToPruneList::AddSupersedenceInfoIfNeeded
The bug is obviously in highly inefficient traversal through the existing info about the updates, which didn't degrade to being so obviously bad at the time when there was just a small number of the updates.

I've used Microsoft tools to diagnose that, and I'm not the only one who has found it,

http://www.dslreports.com/forum/r30535980-WIN7-MS-updates-ta...

so the same info is available to Microsoft, but they obviously don't want to fix it.

On my machine it takes some 4 hours using 100% CPU of one core. If there are only 100 millions of such machines, and if it's just 40 Watt hours used during these 4 hours, it gives some 4 Gigawatt hours wasted every month in the world due to that particular bad code (If I calculated it right, over one year, it's a rough equivalent of the total energy use of 1500 Germans or 500 US citizens.)


The only solution to this I've found is to disable Windows Update from searching for updates by setting it to "Manual Updates Only".

However, this causes a problem in that every time you want to actually update, Windows Update may rebuild the entire "installed updates" database from scratch which can take hours on a heavily patched machine.


It's not related to the rebuilding or not rebuilding the "SoftwareDistribution" database (I've tried that) once the new updates exist, the traversal part is always slow, at least on Windows 7.

(The database is, fascinatingly, the whole 1 GB big).


I'm not certain what causes it for you, but for me it was microsoft's antimalware scans. These are supposed to run only in 'idle' mode but for whatever reason were running while I was using my computer.

What's worse is the automatic OS restarts that seem to also think I'm in idle mode.


If you're using Windows 10, have you set your active times?


I ended up turning off all that crap eventually. I cant remember what exactly I did but it was quite an adventure that involved registry edits and stopping services. Certainly not something that is made easy.


The setting I'm talking about is in Update Settings -> Change Active Hours. From your previous post, it sounds like you haven't disabled automatic updates, so changing when they update so it doesn't happen while you're working might be a good option, and it has nothing to do with the registry.


If you're on Pro or above you can set updates to download on demand


CPU? Never had problems with it.

But it literally rapes my HDD while updating(anytime it wants) or it's AV scanning disk(and you can't turn it off)

It makes my desktops unusable.


> The thing is sitting there doing nothing

Doing nothing, except mabye mining a fuckton of data about you and sending it to Microsoft.


To all the downvoters, please check this link: http://cmdrkeene.com/psa-windows-10-high-cpu-usage

And take note of point 1 and 2.


Some interesting optimizations in here, but I'm curious about this one in particular:

> With the Anniversary Update, Microsoft Edge only executes background JavaScript timers once per second in background tabs. More importantly, these timers are coalesced with other work happening across Windows. Microsoft Edge doesn’t wake up the hardware to perform work. Instead we tag along with other work happening across the system, and then quickly yield, allowing the hardware to enter a low power state.

Are there any implications for web techs (maybe like WebTorrent?) that do need to run JS constantly in the background?


In Safari, which slows background JavaScript down or stops it altogether, music stops playing occasionally on Soundcloud when a song ends. The only option to prevent this is to make the Soundcloud tab the sole tab in the browser window. The window can be in the background but the tab is not treated as background tab because it is the active tab in the window.


I personally would be happy if all background tabs would stop completely if they don't have focus for a configured amount of time, and don't have a network connection currently in use.

To keep a tab active pin it, those tabs will be immune from that.

And not for power consumption but simply for browser speed!


There's a chrome extension called 'the great suspender' that does exactly that.



I'm not sure about Edge in particular, but on most platform runtimes "timers" are separate from IO-availability-triggered asynchronous events. When a WebRTC data connection signals its send channel has become unblocked/receive channel has data available, a handler will be called right then; there's no timer involved. Timers are just for things that have no relevant IO to control them, like animations.


That was my understanding as well, but the improvement in CPU utilization they showed [0] seemed to be a bit too dramatic to be attributed solely to more infrequent timer ticks. I guess they must done some serious cherry-picking on the sites used for that benchmark.

[0] https://winblogs.azureedge.net/win/2016/06/cpu-utilization-1...


What would be cool is the ability to right click on a tab and give it priority so that it runs with higher performance.


Google did make battery life improvements by reducing wakes at least on the Mac in response to Safari performing better. Some interesting details are at https://plus.google.com/+PeterKasting/posts/GpL63A1K2TF

Perhaps Edge will a nice competitive impact on the Windows side :P.


Perhaps they should have cared years ago when this problem was first clear. I don't know about on Windows but on OS X the difference has been massive for years and years.


It's been true for a while on Windows, going back to IE9: https://blogs.msdn.microsoft.com/ie/2011/03/28/browser-power...


That's odd, a month ago I read a statement from Opera that they had the most power efficient browser. Which is the most powerefficient? http://www.windowscentral.com/opera-adds-power-saving-mode-i...


The Anniversary Update isn't out yet, so Opera's power-saving mode is probably the best you can get at the moment.


Actually the tests in the post linked from the Edge blog we're on current stable bits; Brandon's post details additional improvements coming soon. In our testing we're considerably more efficient than Opera.

Notably, Opera turned on their (off-by-default) ad blocker for their power efficiency measurements.


Trying to get a full days use out of my laptop I did some tests last week, Edge with adblock beats Opera with battery saver + adblock.


That's pretty nice but the lack of plugins means I can't have LastPass/1Password, uBlock, etc, which kills it for me.


Extensions are coming with the anniversary update in a month or so, I'm excited!


Any idea what the development model is for Edge extensions? Would love to see them supporting the WebExtensions API [1] rather than roll out something proprietary.

[1] https://wiki.mozilla.org/WebExtensions


They're going to be mostly chrome-style, with a tool to convert chrome extensions.


I have a Surface Book, once Edge support EFF Privacy Badger, Edge will likely become my default browser.


Sold my SP3, but do Firefox and Chrome both still feel wrong on the touchscreen, as far as scrolling and zooming go?

I'd been using IE on that thing on account of nobody else being able to do it right.


Chrome has gotten better with touch and pen support, but Edge is still much cleaner. Zooming in things like Google Maps on Chrome still isn't great, but the biggest issue is the mouse cursor disappears regularly with Chrome and requires a force quit of Chrome (which is trying to run in the background) to fix.

https://bugs.chromium.org/p/chromium/issues/detail?id=451965


They both still need work. Opera and Edge are probably the two best touch browsers for Windows, atm.


If you're looking for privacy, I would stay away from proprietary browsers (and operating systems, especially those with mandatory telemetry that are produced by an NSA PRISM corporation.)


https://imgur.com/g31emJv

I'm using extensions.


You can use Lastpass/Adblock in the insider versions. It will roll out to everyone soon.


LastPass and AdblockPlus are already available to insiders. Still waiting on PrivacyBadger and Ghostery for my own preference.


But how does it compare to Safari on Apple computers? AFAIK Safari is extremely power efficient.


That's really an Apples to Oranges comparison since Macs and PCs aren't comparable. Yes you could run Windows in BootCamp but it isn't tuned for that and is actually hampered. It would be like making a Surface Pro a hackintosh and using that as a basis for comparison.


Comparing Edge on Windows to Safari on macOS is apples to apples. Browsers running on an OS. I d be really interested in this comparison, since Apple's big selling point is being apple to specialize since they control the hardware. If Edge can come close or beat them on more diverse hardware, that would be very impressive.


Not quite. I imagine Windows isn't well optimized for a MacBook Pro, Apple isn't going to go out of their way to squeeze every drop of efficiency out like they do on OS X.


The MacBook Pro is standard x86 hardware nowadays using off the shelf parts available to most manufacturers (except maybe the chassis and display). Do you know if there's something else special about them?


I know that in order to use the following you must install Apple's Support Drivers on your Windows Image.

* USB 3

* USB-C on the MacBook (Retina, 12-inch, Early 2015) and later

* Thunderbolt

* Built-in SD or SDXC card slot

* Built-in or USB Apple SuperDrive

* Your Apple keyboard, trackpad, and mouse

Assuming BootCamp were just a hyper-visor exposing the underlying hardware or a HAL, why are custom drivers necessary for those things?


> you could run Windows in BootCamp but it isn't tuned for that and is actually hampered

How is bootcamp'ed windows hampered? It works perfectly fine for me. In fact, it's better than many Windows laptops I've used because they almost all ship with so much bloatware on them.


The HW has proprietary power management features that Windows cannot take advantage of. For the end user it's probably no big deal, but I think the commenter you replied to is right - power management is a delicate dance between hardware and software, and not all hardware is accessible from all software on every platform.


"Can't" and "won't" are distinct; if Apple doesn't want to write e.g. Power Nap drivers for Windows, Microsoft could certainly do it. (I'm surprised they haven't; Windows has the incentive to work well everywhere much more than Macs have an incentive to run everything equally well.)


Could they? Do they have access to the Apple firmware documentation?


What would they stand to gain? This is what .001% of it's users?


This statement is true for any laptop running Windows, it is not MacBook specific


Dell has a vested interest in making sure Windows is as battery efficient as possible on their laptops.

Apple does not. Base line Windows power management (generic Intel drivers, etc) is probably good enough for them.


There has been a lot of similar work on iOS. Check out the WWDC videos at developer.apple.com a year or more likely two back. It is quite amazing what can be done by schedulers and proper use of resources. I guess these optimizations have also found their way back into macOS and Safari on the laptop platform. Considering the release frequency who knows for sure but at least Apple claims their broswer is very efficient.

It is worth noting that some of the changes go really deep in the architecture and are not easy to pull off. I think lack of system level focus on low battery and the need to do deep changes in the OS are the reasons for the considerable lateness of Microsoft on this front.


Well half the things on the list Apple announced they were doing like 2 years ago


Really sad that so much engineering time from browser teams is still spent on flash. Can we just let this tech die already?


If you can get all the flash developers on Kongregate switch.


Even better, a more standards-efficient browser would reduce the economic resources allocated (by the market) towards ensuring site compatibility across the web, and therefore power.


The item 3 is very impressive. Anyone knows if the other major browsers test for such thing?


Apple cares a ton about this for obvious reasons. They want to claim all day use on their products and having s very efficient web browser is a big part of it.


As computing moves from a desktop centric function to a mobile centric function, a more power efficient software should be one of the top design requirements. This is a problem across all platforms.

Imagine if your phone/laptop's full charge lasts for 1 week instead of 1 day.


Why was Safari excluded? It's an interesting data point in the power-efficiency topic.


Doesn't run on Windows. So you'd change more than the browser running on otherwise exactly the same machine, making a comparison difficult.


Could just as easily run windows natively on a mac for comparison on the same hardware.

Also might be able to do a battery size to hours of browser use comparison.

Or, comparing Microsoft with their hardware (Surface Pro's are great) vs a Mac laptop.

At the end of the day, time in a browser.... is time in a browser to the end user.


Doesn't Chrome already do that Javascript timer slow down for background tabs?


tl;dr probably: use an ad blocker


The problem of Edge is its usability, it is full of annoying bugs and incomplete functions, just like the Windows 10.

- a Windows 8 lover.


I believe they are too late to bring this up.


I wish they didn't do these tests on a Microsoft-made Surface Book...They should've taken a couple of other popular Windows 10 notebooks and maybe do the tests on those. Who knows how much of this difference is because of Edge itself (which is how well it would work on other notebooks, too), and how much it's the optimization they did for Edge for their own hardware.


They say they test across hardware in the article - the Surface Book is the only one they pictured because it's an MS blog and an opportunity to advertise MS hardware.

Besides, I'm pretty sure lowering the number of frames in an animation (among the other fixes/features they mention) is going to pretty much universally lower power requirements.


We chose the Surface Book because it's instrumented with a chip that allows direct measurement of instantaneous power consumption, which most OEM devices don't have, and because it has lots of battery for a fun run-down video :)


Sure, but am I supposed to believe that Edge doesn't get special optimizations on the Surface Book compared to on other devices?


Another great way to save a ton of energy and bandwidth is to block ads. Glad to see that they are finally allowing ads. Been long enough.

Still a mediocre browser though IMO. iamleppert nailed it on the head.


Do you mean that they are finally allowing ad blockers, via the extension support coming this summer?


Yeah, I think that finally allowing ads part was meant to be 'finally allowing extensions/plugins'.


re: The reading mode button animation batery use improved

Who needs the button animation at all? I like them not moving, every movement of something that's always on the same place is distracting.

It's stunning on what they spend the energy of the management and the programmers, not only of the CPU's and GPU's of all of us.

"We replaced the traditional XAML animation with a timed GPU transform, and now animate the contents through a viewport – relying entirely on the GPU to perform the work."

Apparently XAML is a traditional way to animate GUI buttons there. Wow.


It's a hint to users that reading mode may provide a better experience. When we introduced it, reading mode usage went up; without the (very subtle) animation, users weren't aware when the feature would be useful.


The real problem here is that, as with a lot of other aspects of UIs today, most of your users probably have no idea what that icon or indeed a lot of the others is supposed to mean. If it was just plainly marked "Reading Mode", you might get the usage increase without wasting countless hours designing an animation and having it, in turn, waste the energy of your user's machines and then having to spend even more time and energy "optimising" that animation.

Stop making UIs consisting entirely of vague mystery-meat-navigation-buttons-some-that-don't-even-look-like-buttons and none of these problems of discoverability would exist.


Counterexample: Safari 7 had a big blue button that said "Reader." It was literally the largest button in the app.

Usage did not change.


Of course usage will go up when you animate it. That's like saying people click the Ok button more when you put it on a popup dialogue. The question is: do people keep using it when you don't animate it. Were they using it because it was animated, or because it's something they like to use?


Are you suggesting they're only clicking it because it shiny?

If they didn't like it they'd stop using it after the first click and the numbers wouldn't appear to go up more than a single little bump. Clearly it helps people to have that cue there.


Well, I only clicked it because it was shiny, and I'm nobody special.


Still it shows what's done just to make somebody's bonus (or just prestige in the meetings?) thanks to the change in the telemetry reports. Luckily both Safari and Firefox don't animate it.

And if I'm not wrong, Safari was the first to have it, years ago, at the time Jobs was there. Never animated.

Anyway, if the feature is useful, people will use it. If it's not, they won't. Not making the whole experience a "big ad" is an example of a taste. Microsoft managers however really like everything moving like in ads including the tiles in the "start" menu. Luckily they at least can be "unanimated," I hope that feature remains (but unluckily I believe I have to do it one by one).


People will use it, but only if they know it's there. I've met a ton of Safari users who have no idea what that thing is or even that it's there in the first place.

They tend to love it after I pointed out to them. Microsoft is probably doing the right thing here.


We get great feedback from users who discover the feature and want it to be discoverable without being obtrusive. If you haven't seen the animation, you might be overestimating it - it's extremely subtle and tasteful, just a tiny flip of the pages in the reading mode button when it goes from an inactive to active state.


Even if you insist on the "ad" it still needs to be displayed only to the users that never clicked it, once anybody clicked once, you aren't helping him "discover" it.


They can start to compare themselves against Chrome when they are at least at feature parity with HTML5, CSS3, Ecmascript6, work cross-platform (not just on Microsoft-owned platforms), and have useable developer tools. I'm not sure I know of any professional web developers that don't view IE/Edge as an afterthought still. We build our applications in Chrome/FF, using Chrome/FF, and occasionally test to make sure the experiences don't totally suck in the others. They are also missing something like Electron, which is used a lot to build native cross-platform apps using web technologies.

Power efficient is nice, but today's mobile phones have much lower hanging fruit -- you could run the CPU for days at 100% if you didn't care about the display/backlight, cellular radio, or GPS. If you don't believe me put your phone in airplane mode and play a video or game on loop with the brightness turned all the way down.


>when they are at least at feature parity with HTML5, CSS3, Ecmascript6

Edge 14 has 90% on kangax, putting it on par with current Firefox 48.

>work cross-platform (not just on Microsoft-owned platforms)

Valid concern.

>have useable developer tools

Have you tried them recently? They've made massive improvements.

>They are also missing something like Electron

UWP for Windows 8+, HTA for older platforms.


Does Edge implement WebRTC now?


Edge implements ORTC, working on WebRTC 1.0 for interop.


> They are also missing something like Electron, which is used a lot to build native cross-platform apps using web technologies.

While I am not a Windows developer in the slightest, this is sort of missing quite a bit.

https://msdn.microsoft.com/en-us/windows/uwp/get-started/cre...

https://github.com/Microsoft/node-uwp

https://developer.microsoft.com/en-us/windows/develop/winjs

Microsoft support using JS to develop desktop applications using web-tech as a first-class citizen.


> They can start to compare themselves against Chrome when they are at least at feature parity with ... We build our applications in Chrome/FF, using Chrome/FF, and occasionally test to make sure the experiences don't totally suck in the others.

And by "don't totally suck" you apparently don't mean battery life? Having my wife switch from Chrome to Safari on her macbook was the best thing that ever happened to her battery [1] - it literally can make the difference between needing a power adapter or getting a full days work done.

[1] http://www.theverge.com/2015/4/10/8381447/chrome-macbook-bat...

edited for formatting


Why would cross-platform or developer tools be of any relevance when comparing energy efficiency while browsing the web on a Windows laptop? It's possible to use one browser when doing one task, and another browser when doing another. This article suggests that using Edge while consuming content on a battery powered computer would enable you to work longer, if you can do without the things you mentioned. Most people can.


Different strokes for different folks. I'd personally rather have a power efficient browser than one that implements every single experimental W3C spec.

Now, I don't use Windows, but I've switched from Chrome to Safari because it's easier on my aging MacBook battery.


This type of fanboy comments are getting sick here, must be the summer.

This post is not about those subjects, and for the normal user, who uses his laptop unplugged, this is much more important than a browser being available on the Mac and Windows, or developer tools, etc.


I see comments like this a lot on HN. People here think a browser is "complete" with it supports all the corner cases that developers want.

But MS, like Apple with Safari, are developing a browser that is useful for users, not necessarily for developers, at least initially.


None of what you just said negates that Chrome is a notoriously bad battery hog on PC and Mac. Opera, Edge and Safari are better than Firefox and Chrome both.

It's pretty clear you don't like Microsoft, which is fine...but your opinion added nothing to the discussion, all things considered.


" and have useable developer tools." - Let us know how we can improve your experience.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: