





Editor’s note (9/28/16): The Anniversary Update is now available, so we updated all our tests to compare the latest versions of each browser. Good news: Microsoft Edge now gets even more out of your battery!

Today, Jason Weber shared a post on the Windows Experience Blog demonstrating the power efficiency of Microsoft Edge over other popular browsers on Windows 10. With the Windows 10 Anniversary Update, we are hard at work pushing the envelope further, engineering Microsoft Edge to last even longer with typical workloads.

In this post, I’ll share our approach to the complex problems of battery life and power consumption, and discuss some specific work we’re doing to improve Microsoft Edge’s energy efficiency in the Windows 10 Anniversary Update.

How we measure energy efficiency

Improving energy efficiency starts in a controlled lab environment where we can run repeatable tests. At Microsoft, we have a lab specifically designed for measuring power consumption, where we run the newest builds of Windows 10 and Microsoft Edge. This allows us to see how they perform against different workloads and with different PCs.

We measure power consumption across a diverse set of Windows hardware – desktops, laptops, tablets, phones and more. Process architectures, screen sizes, and even physical characteristics like heat dissipation and mechanical fans can have a significant impact on power consumption. It’s important to broadly improve power efficiency for everyone.

Machines such as the below Surface Pro 3 are connected to specialized power monitors which measure instantaneous power consumption down to the milliwatt. As we run different workloads across these machines, we measure exactly how much energy they consume.

We also record detailed diagnostic information through Windows Event Tracing, which allows us to understand what was happening in software, and correlate that to the energy consumed by the machine – specifically Microsoft Edge and the website’s HTML, CSS, and JavaScript.

The lab provides repeatable and immediately actionable results in a controlled environment. This allows us to validate improvements, identify regressions, and ensure that Windows and Microsoft Edge are continuously improving with every code change.

Informing power efficiency through customer telemetry

Our objective is to improve efficiency for users, and it’s important to understand what’s happening in the real-world. The Windows Energy Estimation Engine (E3) is a service running on all battery powered Windows 10 devices which tracks energy usage across hardware, apps, and services. The E3 service provides users with more control over their battery life by informing battery saver recommendations, and aggregated results are used by Microsoft through the Windows telemetry systems to improve the Windows ecosystem.

Many modern Windows computers, such as the Surface family, include specialized hardware designed to measure power consumption. This specialized hardware measurement provides 98% accuracy, compared to system software power measurement which has 85% accuracy, and application software power measurement which has minimal correlation to actual power consumption.

Some of our most important insights come from aggregated data from millions of Windows devices reporting billions of data points around Microsoft Edge’s energy efficiency to Microsoft on a monthly basis. We particularly pay attention to telemetry coming from systems with specialized hardware measurement – you just can’t beat 98% accuracy.

Have you ever wondered how many joules of energy are spent on JavaScript garbage collections every day? Those are the multifaceted questions we consider as we optimize Microsoft Edge for performance, power, memory, and more. With this level of data, the tradeoffs around power become clear and intentional.

With every Windows Insider flight, we compare our power consumption with past flights and released versions of Windows. We use this telemetry to ensure new features and code changes don’t increase our power consumption, and to validate new features designed to improve energy efficiency. Thanks to the Windows Insider Program, we can validate our engineering and ensure Microsoft Edge only improves with every release!

Energy efficiency improvements in the Windows 10 Anniversary Update

The Windows 10 Anniversary Update brings dozens of improvements to power efficiency, informed from analyzing customer telemetry and experiments in our controlled labs. These improvements are built into Microsoft Edge, so you don’t need to change settings or turn on a power saving mode – every Microsoft Edge user will receive these without a compromised experience.

Here are four examples which provide a feel for the type of power optimizations occurring.

1. Background tabs are more efficient

Websites frequently run JavaScript in the background, even once fully loaded and not visible to the user. These sites may be checking for new email, analyzing ad metrics, running animations, or anything really – the web is a diverse place. So, when a user has a lot of background tabs open at once, these tasks add up, causing the CPU to work more than it needs to. This makes the computer slower and consumes unnecessary battery life. We’ve heard feedback from our Insiders telling us that sometimes Microsoft Edge is using more CPU than they expect, and background tabs are frequently the cause.

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.

Savings vary depending on the websites you have open, but we’ve seen energy savings of over 90% in some scenarios.

This balance allows your background tabs to keep connections to servers open, check for mail, play music, run analytics, and whatever else they need to do, and also makes your system faster while saving your battery.

Savings vary depending on the websites you have open, but we’ve seen energy savings of over 90% in some scenarios. As an example, the following charts show CPU improvements with eight popular websites open in background tabs.

2. Flash is more efficient

Flash ads are common on the Internet and they can have a high battery cost, primarily through continuous animations which continually consume CPU, GPU and display resources. In the Anniversary Update, Flash is now running inside a separate process, and controls which aren’t central to the page are paused by default. Users who want to interact with Flash can simply click the control.

And given Flash is now running in a separate process, we can monitor and control the resource impact of Flash. When Flash consumes too many resources or crashes, we can stop the Flash process without impacting the website.

3. Microsoft Edge’s user interface is more efficient

The Microsoft Edge user interface has been optimized for power efficiency. Animations are an important part of the Windows 10 and Microsoft Edge design language, but animations can consume considerable power if they perform more work than necessary.

For example, the reading mode button animation has been redesigned around power efficiency.

The reading mode button was previously composed of 120 frames. Each time we updated the frame, we caused an expensive XAML layout and visual update. Here we can see the GPU cost for this one animation:

We have improved this in several ways.

The animation had identical frames at the beginning and end of each loop, so progressing frames didn’t always result in visible changes. Optimizing this removed 40% of the frames.

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.

These coupled with other optimized have reduced the GPU cost by nearly 75%, the CPU cost by 100%, and reduced the power impact to near zero.

Here’s the GPU cost of this animation with the Anniversary Update:

That looks much better! We’re applying this level of optimization across our user interface, because every milliwatt counts.

4. Windows networking is more efficient

Microsoft Edge builds on the Windows platform, and benefits from power optimizations throughout Windows. The Windows 10 Anniversary update delivers a range of networking improvements which improve performance and efficiency, while reducing power consumption.

The new TCP Fast Open (TFO) feature allows connections between the device and the server to be setup faster with fewer messages. And the TCP stack now includes an optimized Initial Congestion Window (ICW) with a larger maximum message size, meaning fewer messages have to be exchanged with the server. Fewer messages means the wifi antenna can be turned off sooner, saving energy.

We’ve also added features called Tail Loss Probe (TLP) and Recent Acknowledgement (RACK) which reduce the time required to correct for lost packets. If it’s likely that a message is going to time out, we send a request for the data again sooner than the normal timeout. Doing this allows us to switch off the wifi antenna sooner when you have a poor connection.

What’s next?

Are we done? Absolutely not! When it comes to energy efficiency, we’re never really done, and you’ll continue to see this level of investment over the coming releases. You can preview these improvements today in the Windows Insider Program, and we look forward to bringing them to everyone with the Windows 10 Anniversary Update this summer.

Brandon Heenan

Program Manager, Microsoft Edge