Chrome’s Journey to Unmatched Speed on Android Devices
Today, we delve into the remarkable progress Chrome has made in optimizing web performance on mobile devices, specifically focusing on Android. This advancement has led to a significant enhancement in user experience, making web browsing faster and smoother for millions of users across the globe.
The Pursuit of Speed
Chrome’s commitment to speed is unwavering. From its inception, the browser has been built with performance as a priority, ensuring quick page loads, seamless operation of complex web applications, and an overall fluid user experience. The Chrome team continually strives to enhance these aspects, and recent efforts have yielded impressive results for Android devices.
A Two-Year Endeavor
Over the past two years, extensive work has been dedicated to improving Chrome’s performance on Android devices. This dedication has resulted in substantial achievements, which the team is now excited to share with the broader community.
Understanding the Speedometer Benchmark
To assess Chrome’s performance, the team relies on the Speedometer benchmark. Developed in collaboration with other major web browser engines, this benchmark measures the speed at which Chrome processes web interactions. These interactions include parsing and rendering HTML/CSS and executing JavaScript.
Since the rollout of Chrome version M112, there has been a noticeable improvement in Speedometer 2.1 scores on Android devices. On many devices, these scores have more than doubled, with the latest Snapdragon® 8 Elite Mobile Platform setting new benchmarks for mobile performance. This success is a testament to the collaborative efforts of the Chrome and Android teams, along with their silicon and System on a Chip (SoC) partners.
Key Improvements
The enhancements in performance are the result of several strategic changes:
- Build Optimizations: The way Chrome is constructed has been optimized, leading to faster code execution tailored for modern, high-end Android devices and SoCs.
- V8 and Blink Improvements: Upgrades to the JavaScript engine (V8) and the rendering engine (Blink) have significantly contributed to performance boosts.
- Cooperation with Android Partners: By working closely with Android partners, Chrome has optimized its interaction with the operating system and its thread scheduling to make best use of the device’s silicon capabilities.
Build Optimizations Explained
The Android ecosystem is highly diverse, ranging from basic smartphones to cutting-edge premium devices. Chrome must perform efficiently across this spectrum. Previously, the same Chrome build was distributed to all Android devices, which limited the use of modern optimizations due to memory and disk size constraints on entry-level devices.
With the release of M113, a separate high-performance build was introduced for premium Android devices through the Google Play Store. While a size-constrained build is still available for other devices, this new approach allows for modern optimizations on high-end devices, thanks in part to contributions from ARM.
Some of the key enhancements include:
- Utilizing ARM64 instead of ARM32, leveraging more efficient instruction sets and larger 64-bit operations.
- Compiling C++ code optimized for speed rather than size on premium devices.
- Adjusting compiler inlining thresholds to balance performance across hot and cold code paths.
- Implementing profile-guided optimization (PGO) techniques to enhance code layout and optimization.
- Improving cross-function code ordering by aligning orderfile generation with the new ARM64 build.
Together, these build optimizations have accounted for more than half of the overall improvements in Speedometer scores.
V8 and Blink Enhancements
Continuous updates to Chrome’s JavaScript and web rendering engines, V8 and Blink, play a critical role in performance enhancements. While many optimizations individually have a minor impact, collectively, they significantly boost performance. Noteworthy improvements include:
- The introduction of an optimized fast-path HTML parser for parsing innerHTML attributes.
- Launching V8’s Sparkplug compiler, a fast baseline compiler, and Maglev, a mid-tier compiler, allowing for gradual performance improvements and reduced power consumption.
- Adjusting garbage collection heuristics to occur during idle periods or when users navigate away from pages.
- Implementing numerous incremental optimizations across various engines, including parsing, style, layout, and text rendering.
Collaborative Efforts with Android Partners
To achieve peak performance, Android partners invest heavily in tuning operating systems’ thread scheduling and frequency scaling policies, along with enhancing silicon performance. Collaboration with partners like Qualcomm has been particularly fruitful. By combining optimized scheduling with improved hardware, Qualcomm’s latest Snapdragon 8 Elite Mobile Platform has achieved a 60-80% improvement in Speedometer 3.0 scores over its predecessor, setting a new standard for mobile web performance.
This partnership has also helped identify critical bottlenecks in Chrome’s code, leading to improved PGO and new opportunities in V8.
Real-World Impact
The improvements in Speedometer scores translate directly into better user experiences. For instance, loading a Google Docs document on a Pixel Tablet used to take over 50% longer than it does now, showcasing the tangible benefits of a doubled Speedometer score.
Conclusion
The advancements in Chrome’s performance on Android devices are a result of meticulous work and collaboration. By focusing on build optimizations, enhancing core engines, and working closely with partners, Chrome has set a new benchmark for speed and efficiency on mobile devices. These improvements ensure that users can enjoy faster, smoother web interactions, solidifying Chrome’s reputation as a leader in mobile web browsing.
For more details on the technical aspects of these improvements, you can refer to the official Chrome blog.
For more Information, Refer to this article.