News: 1677603668

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Google Chrome fights the power drain (again)

(2023/02/28)


Google's code gremlins have been tweaking the company's Chrome browser under the hood to help Apple's MacBooks consume less power.

Chrome has long had a reputation for being less than frugal when it comes to power consumption. These issues can arise from software design choices, bugs, and ill-behaved [1]third-party extensions .

Regardless, Google has intermittently made efforts to curb Chrome's thirst for energy. In January 2021, for example, Chocolate Factory software engineers tried to reduce the power consumption of Chrome on mobile devices by [2]throttling JavaScript timers .

[3]

Even so, Chrome has generally lagged [4]behind Apple Safari but [5]ahead of Mozilla Firefox [PDF] when it comes to [6]power consumption .

[7]

[8]

Apple on its website [9]claims Safari provides browser users with up to two hours more streaming video than Chrome, Edge, and Firefox, and with up to 17 hours of wireless video, based on its own test using a 13-inch MacBook Pro with Apple M2, 8GB of RAM, 256GB SSD, and a pre-release version macOS Ventura.

In an effort to do better, Google [10]announced battery and memory optimizations on December 8, 2022. The arrival of Chrome 108 about a week earlier brought two new performance settings, Energy Saver and Memory Saver, to maximize battery life when a device battery is low and to free up unused memory. These were rolled out globally for Chrome on Windows, macOS, and ChromeOS in the weeks that followed.

[11]

Concurrently, Google has been adjusting the way Chrome processes data. These changes have been appearing in a gradual rollout via Chrome 108 (November 29, 2022), 109 (January 10, 2023), and 110 (February 7, 2023), and are expected to hit 100 percent coverage by the end of the week.

In a blog post provided in advance to The Register , Chrome software developer François Doray explains that the team has made several low-level changes to achieve better battery life on Apple MacBooks.

[12]Microsoft begs you not to ditch Edge on Google's own Chrome download page

[13]What Brit watchdog redacted: Google gives Apple cut of Chrome iOS search revenue

[14]Chrome bug bedevils file storage in the cloud

[15]Google polishes Chromium code with a layer of Rust

First, Google engineers have been adjusting how Chrome manages garbage collection and memory compression for recently created [16]iframes . The result has been reduced power usage.

Second, JavaScript timers, put on a power diet two years ago, saw further adjustment.

"JavaScript timers were introduced at the beginning of the Web's history," said Doray. "Since then, Web developers have access to more efficient APIs to achieve the same (or better!) results. But JavaScript timers still drive a large proportion of a Web page's power consumption. As a result, we tweaked the way they fire in Chrome to let the CPU wake up less often."

[17]

This also involved efforts to cancel internal timers that were no longer needed. Timer cleanup happens to be a common memory management recommendation in the JavaScript world.

Third, Google's coders made data structure access more efficient by making key/value lookups take less time.

And finally, Googlers tested websites with a bot to find Document Object Model (DOM) change patterns that don't change pixels on the screen. Chrome was then modified to detect these patterns and to bypass the browser's style, layout, paint, raster, and GPU steps when these patterns occur since no visible page change is required.

All told, these adjustments now mean you should be able to browse in Chrome for 17 hours or watch YouTube for 18 hours on a MacBook Pro (13", M2, 2022), said Doray, citing Google's open source [18]benchmark test suite .

Your move, Safari. ®

Get our [19]Tech Resources



[1] https://bugs.chromium.org/p/chromium/issues/detail?id=1400755

[2] https://www.theregister.com/2021/01/19/chrome_88_manifestv3/

[3] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=2&c=2Y-6Hl0wABC5fCtNcKbb2GgAAAMc&t=ct%3Dns%26unitnum%3D2%26raptor%3Dcondor%26pos%3Dtop%26test%3D0

[4] https://youtu.be/LiXZ_kCoInQ?t=114

[5] https://states.github.io/files/p23.pdf

[6] https://youtu.be/eQuJdy1OeR8?t=65

[7] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44Y-6Hl0wABC5fCtNcKbb2GgAAAMc&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0

[8] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33Y-6Hl0wABC5fCtNcKbb2GgAAAMc&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0

[9] https://www.apple.com/safari/

[10] https://blog.google/products/chrome/new-chrome-features-to-save-battery-and-make-browsing-smoother/

[11] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44Y-6Hl0wABC5fCtNcKbb2GgAAAMc&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0

[12] https://www.theregister.com/2023/02/23/microsoft_edge_banner_chrome/

[13] https://www.theregister.com/2023/02/17/google_apple_chrome_ios_revenue/

[14] https://www.theregister.com/2023/01/29/chrome_bug_file_storage/

[15] https://www.theregister.com/2023/01/12/google_chromium_rust/

[16] https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe

[17] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33Y-6Hl0wABC5fCtNcKbb2GgAAAMc&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0

[18] https://source.chromium.org/chromium/chromium/src/+/main:tools/mac/power/

[19] https://whitepapers.theregister.com/



Now to extend this to mobile phones

Anonymous Coward

Now they just need to remove all the power-sucking bloatware from the mobile phone versions of Chrome.

Chrome, like bumpers on 70s cars?

chivo243

Safari? Get a life! Firefox, or Brave, Opera coming a distant third... As someone who has used macOS since OS X 1.0 (actually Classic 9x), I tried to love Safari, but it just seemed too up and down. One version was blazing fast, later on, it was just meh... I still dip my toe in the Safari waters from time to time, but I can't feel the love.

TBH, I was a long time user of Camino.... it just worked.

Re: Chrome, like bumpers on 70s cars?

Anonymous Coward

Safari is pretty solid these days, having caught up with features like FavIcons (seriously), tab groups, and it has some nice ecosystem integrations such as auto-populating 2FA codes when they arrive via SMS.

However you do still come across the odd website that doesn’t function correctly so need to fire up a Chromium based browser of choice.

when these patterns occur since no visible page change is required

heyrick

Any chance this was beta alpha tested on Android first?

I ask because it seems recent incarnations, if you have pinched out to zoom, frequently fail to redraw random rectangular bits in the middle of the screen, leaving blank white bits. It's quite annoying, and only seems to happen if the content is zoomed.

Bond reflected that good Americans were fine people and that most of them
seemed to come from Texas.
-- Ian Fleming, "Casino Royale"