Posted by Ben Weiss, Senior Developer Relations Engineer
NordVPN is a digital personal community (VPN) app that protects customers whereas they’re shopping the net by offering them a safer and personal connection. As a community utility, NordVPN’s customers deserve a responsive UI, permitting them to arrange their protections at a second’s discover. That is why NordVPN builders just lately built-in Baseline Profiles, a profile-guided optimization that helps Android builders enhance an app’s startup and runtime efficiency utilizing ahead-of-time compilation.
Bettering efficiency with Baseline profiles
As a part of its product roadmap for 2023, the NordVPN crew needed to spice up the applying’s efficiency. Earlier than implementing Baseline Profiles, NordVPN’s startup occasions on Android gadgets didn’t meet the crew’s requirements, prompting them to look at new methods to make the app run higher.
After exploring methods to enhance its runtime efficiency and streamline the login course of for customers, NordVPN builders recognized a possibility to make the app quicker utilizing Baseline Profiles. Baseline Profiles lets the Android Runtime (ART) know which code paths to optimize by way of Forward-of-Time (AOT) compilation earlier than an app launches, boosting pace, stability, and total responsiveness throughout startup, when navigating by way of the app, and whereas viewing content material.
“App pace and stability are important for a greater consumer expertise, so we’re at all times searching for new methods to enhance NordVPN’s efficiency,” stated Himanshu Singh, senior Android engineer at NordVPN. “We needed to hurry up the app’s load time and make launch and navigation quicker than ever.”
By making use of Baseline Profiles, NordVPN improved its launch pace by a mean of 24%. Utilizing instruments like Android Vitals, the NordVPN crew measured that it had decreased the applying’s chilly begin time from 4.3 seconds to three.2 seconds, the nice and cozy begin time from 2.7 seconds to 1.8 seconds, and the new begin time from 1 second to 0.7 seconds.
After implementation, NordVPN builders’ additionally observed that Baseline Profiles made it quicker for customers to login to the app, bettering the consumer login stream. The login stream is measured from when a consumer begins an app to when a consumer is logged into it. Utilizing the Macrobenchmark library to observe the enhancements, the crew noticed that the NordVPN app runs its login stream 60% quicker than earlier than.
Integrating and testing Baseline Profiles is straightforward
The convenience of implementing Baseline Profiles impressed NordVPN builders. The obtainable sources, in-depth documentation, and codelabs from Android allowed them to reinforce the app’s UX with out having to jot down an intensive quantity of code themselves.
Utilizing the Macrobenchmark library, NordVPN builders shortly generated Baseline Profiles for the applying. To do that, they used a Gradle managed machine, which enabled them to create new profiles with no bodily machine. Utilizing a Gradle Managed System additionally allowed NordVPN builders to create contemporary profiles for every app launch construct on their Steady Integration platform. Wanting ahead, NordVPN builders plan emigrate Baseline Profile technology to the official Gradle plugin, which is able to additional automate profile technology.
NordVPN builders mixed growth workflows to create an integration pipeline, permitting them to check the app beneath varied circumstances. Then, the Macrobenchmark library ran Baseline technology assessments, pushing the newest Baseline Profiles into the code base.
A fast increase to app high quality
After integrating Baseline Profiles into NordVPN’s code, its builders noticed fast pace enhancements. The engineering crew assessed the app’s total pace after ending the undertaking and located that, past bettering the app’s launch occasions, making use of Baseline Profiles led to a 29% enchancment to total in-app pace.
“We’re consistently working to enhance app high quality, and Baseline Profiles integration has confirmed to be some of the profitable steps we’ve taken,” stated Šarūnas Rimša, product proprietor at NordVPN. “We’re serving to customers entry the companies they’re entitled to quicker. What’s to not like?”
Get began
Be taught how one can enhance your app’s efficiency utilizing Baseline Profiles.