Google Chrome optimizations improve battery life on Macs


The latest version of Google Chrome for macOS (110.0.5481.100) includes new optimizations that increase battery life on MacBooks.

Google’s tests on an M2-powered 13-inch MacBook Pro running macOS “Ventura” 13.2.1 allowed generic internet browsing for 17 hours and YouTube video watching for 18 hours.

If Chrome’s Energy Saving mode is also activated, the browsing time on macOS may be extended by another 30 minutes.

Ever since Apple released its own “Silicon” line of processors, it revolutionized battery life on Macbooks, leaving the Windows laptop competition way behind on that front.

The reason why Google is optimizing Chrome battery consumption on Macs is likely because users report that Safari has much better performance on the system, leading them to use Apple’s browser instead.

Chrome’s latest improvements will also be felt by those using older Apple hardware like Intel-based Macbooks.

The optimizations

Google says it has introduced “a ton” of under-the-hood energy consumption optimizations on the latest version of Chrome for macOS.

The first highlighted optimization is iframe fine-tuning, where Google’s engineers realized that many iframes only live for a few seconds. This allowed the engineers to fine-tune garbage collection and memory compression to reduce memory usage, lessening energy consumption.

iframes

The second highlighted optimization involves tweaking JavaScript timers to reduce the number of times CPU cores are woken up, thereby reducing power consumption on Mac devices.

Some internal timers that were no longer needed were canceled altogether, allowing the CPU to go idle, a mode it never entered in previous Chrome versions.

timers

Thirdly, Google’s engineers have optimized access patterns for data structures accessed more frequently with the same key, eliminating unnecessary repetitions and streamlining their performance.

structures

Finally, the latest Chrome for Macs features an intelligent redraw elimination system, detecting avoidable redraws that don’t have a visible impact early and bypassing them.

“We navigated on real-world sites with a bot and identified Document Object Model (DOM) change patterns that don’t affect pixels on the screen,” explains Google.

“We modified Chrome to detect those early and bypass the unnecessary style, layout, paint, raster and gpu steps.”

A similar redraw avoidance system was implemented on Chrome’s user interface elements, reducing energy consumption and extending battery life on Mac devices.

Google says these optimizations are just the start of their efforts to enhance Chrome’s power consumption, with plans for additional improvements in 2023 and the future.



Source link