
Building a more power-efficient browser - ingve
https://blogs.windows.com/msedgedev/2016/06/20/edge-battery-anniversary-update/
======
ams6110
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.

~~~
Yhippa
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.

~~~
RachelF
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...](http://www.wintips.org/how-to-fix-svchost-exe-netsvcs-memory-leak-
or-high-cpu-usage-problems/)

~~~
grawlinson
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.

~~~
amenod
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...)

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

~~~
tqkxzugoaupvwqr
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.

~~~
ars
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!

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

~~~
piyush_soni
[https://addons.mozilla.org/en-gb/firefox/addon/suspend-
tab/](https://addons.mozilla.org/en-gb/firefox/addon/suspend-tab/) for
Firefox.

------
zZorgz
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](https://plus.google.com/+PeterKasting/posts/GpL63A1K2TF)

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

~~~
MBCook
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.

~~~
kylealden
It's been true for a while on Windows, going back to IE9:
[https://blogs.msdn.microsoft.com/ie/2011/03/28/browser-
power...](https://blogs.msdn.microsoft.com/ie/2011/03/28/browser-power-
consumptionleading-the-industry-with-internet-explorer-9/)

------
fsiefken
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...](http://www.windowscentral.com/opera-adds-power-saving-mode-its-
desktop-web-browser)

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

~~~
kylealden
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.

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

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

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

~~~
wlesieutre
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.

~~~
mey
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](https://bugs.chromium.org/p/chromium/issues/detail?id=451965)

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

~~~
cptskippy
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.

~~~
ohitsdom
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.

~~~
MBCook
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.

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

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

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

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

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

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

~~~
MBCook
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.

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

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

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

~~~
j45
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.

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

------
slyrus
tl;dr probably: use an ad blocker

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

------
growthape
I believe they are too late to bring this up.

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

~~~
kylealden
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.

~~~
userbinator
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.

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

Usage did not change.

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

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

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

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

~~~
mappu
_> 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.

~~~
taf2
Does Edge implement WebRTC now?

~~~
kylealden
Edge implements ORTC, working on WebRTC 1.0 for interop.

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

~~~
kylealden
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 :)

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

