HomeAndroidTuro diminished its app startup time by 77% utilizing Android Developer instruments...

Turo diminished its app startup time by 77% utilizing Android Developer instruments and greatest practices | by Ben Weiss | Android Builders | Could, 2023


Turo is the world’s largest automobile sharing market the place friends can e book any automobile they need, and wherever they need it, from a vibrant neighborhood of trusted hosts.

Builders at Turo not too long ago invested closely in bettering the startup efficiency of its Android utility. Startup time is the primary impression customers have of an app, and slower load occasions can negatively impression person retention and engagement. The crew wished to offer customers a sooner, extra streamlined expertise each time they launched the app. And utilizing Android’s greatest instruments, sources, and practices, they have been in a position to lower the app’s startup time by 77%.

App initialization consists of an utility’s complete startup course of and all of the code it runs earlier than rendering its first UI body. For Turo, this meant customers needed to await the app to run its preliminary startup, synchronous community requests, and a customized splash animation — all earlier than they have been ever proven the app’s dwelling display.

Turo’s builders knew that to enhance the appliance’s loading occasions, they would want to condense and take away many of those cumbersome startup occasions. To assist pare down these occasions, Turo engineers used Android’s App Startup library.

The App Startup library gave Turo’s builders a easy, streamlined technique to initialize a number of elements throughout the utility’s launch. It additionally enabled them to pick out which elements to initialize and in what order, permitting them to considerably enhance load occasions. Having the App Startup library in place set the muse for the remainder of Turo’s startup optimization.

Previous to optimization, the app carried out a number of community requests sequentially after which displayed a customized, one-second splash animation earlier than customers may entry the app’s dwelling display. This resulted in a sluggish startup course of, particularly if a person had poor community connectivity.

Eradicating the splash animation was a simple method for Turo builders to enhance perceived loading time. And by making community requests parallel and asynchronous, customers may entry the house display a lot sooner. “Initially, we used a devoted SplashActivity to run all of the startup work earlier than routing the app to the HomeActivity. Nonetheless, the most recent pointers advise in opposition to this strategy. Due to this fact, we eradicated the redundant SplashActivity and transferred all of the startup logic to our root exercise by leveraging the Splash Display screen API,” mentioned Pavlo Stavytskyi, a senior workers software program engineer at Turo.

On the identical time, the app was additionally performing a variety of different startup community requests to tailor the expertise to particular person customers, leading to inconsistent person experiences.“If the app is utilized by a visitor, some community requests assist determine which display needs to be proven after the splash display,” mentioned Pavlo. “By default, it’s the house display. Nonetheless, there are particular circumstances the place the person might be redirected both straight to an lively car reservation or to a suggestions display.”

The crew didn’t wish to decelerate each app startup by checking for these area of interest situations. As an alternative, Turo now at all times opens the house display by default whereas making community requests asynchronously. If a redirect is required, the suitable display is displayed on prime of the house display.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments