Tuesday, April 5, 2022
HomeMobileHow a single Android developer improved Lyft’s Drivers app startup time by...

How a single Android developer improved Lyft’s Drivers app startup time by 21% in a single month

Posted by Mauricio Vergara, Product Advertising Supervisor, with contibutions by Thousand Ant.


Lyft is singularly dedicated to app excellence. As a rideshare firm — offering a significant, time-sensitive service to tens of hundreds of thousands of riders and a whole bunch of hundreds of drivers — they must be. At that scale, each slowdown, frozen body, or crash of their app can waste hundreds of customers’ time. Even a minor hiccup can imply a flood of individuals driving with (or driving for) the competitors. Fortunately, Lyft’s improvement workforce retains an in depth eye on their app’s efficiency. That’s how they first observed a slowdown within the startup time of their drivers’ Android app.

They wanted to unravel the issue rapidly — determine what it will take to resolve after which justify such an funding to their management. That meant answering a quantity of powerful questions. The place was the bottleneck? How was it affecting consumer expertise? How nice a precedence ought to it’s for his or her workforce at that second? Fortunately, that they had a strong device at their disposal that might assist them discover solutions. With the assistance of Android vitals, a Google Play device for bettering app stability and efficiency on Android units, they situated the issue, made a case for prioritizing it to their management, and devoted the correct quantity of sources to fixing it. Right here’s how they did it.

New priorities

The very first thing Lyft’s improvement workforce wanted to do was determine whether or not this was a urgent sufficient downside to persuade their management to dedicate sources to it. Like several proposal to enhance app high quality, rushing up Lyft Driver’s start-up time needed to be weighed out in opposition to different competing calls for on developer bandwidth: introducing new product options, making architectural enhancements, and bettering knowledge science. Usually, one of many challenges to convincing management to spend money on app high quality is that it may be troublesome to correlate efficiency enhancements with enterprise metrics.

They turned to Android vitals to get a precise image of what was at stake. Vitals provides builders entry to knowledge in regards to the efficiency of their app, together with app-not-responding errors, battery drainage, rendering, and app startup time. The present and historic efficiency of every metric is tracked on actual units and might be in comparison with the efficiency of different apps within the class. With the assistance of this highly effective device, the event workforce found that the Lyft Driver app startup time was 15–20% slower than 10 different apps of their class — a urgent subject.

Subsequent, the workforce wanted to ascertain the correct scope for the challenge, one that might be commensurate with the slowdown’s influence on enterprise targets and consumer expertise. The info from Android vitals made the case clear, particularly as a result of it offered a direct comparability to opponents within the rideshare house. The event workforce estimated {that a} single developer engaged on the issue for one month could be sufficient to make a measurable enchancment to app startup time.

Drawing on this wealth of information, and interesting to Lyft’s dedication to app excellence, the workforce made the case to their management. Demonstrating a transparent alternative to enhance buyer expertise, a fairly scoped and achievable aim, and clear-cut aggressive intelligence, they acquired the go-ahead.

How They Did It

Lyft makes use of “Time to work together” as a main startup metric (also referred to as Time to full show). To grasp the elements that influence it, the Lyft workforce profiled every of their app’s launch phases, on the lookout for the deadlock. The Lyft Driver app begins up in 4 phases: 1) First, begin the appliance course of 2) “Exercise” kicks off the UI rendering. 3) “Bootstrap” sends community requests for the information essential to render the house display. 4) Lastly, “Show” opens the motive force’s interface. Rigorous profiling revealed that the slowdown occurred within the third, bootstrapping, section. With the bottleneck recognized, the workforce took a number of steps to resolve it.

Lyft time to interact 

First, they diminished unneeded community calls on the essential launch path. After decomposing their backend companies, they might safely take away some community calls within the launch path solely. When attainable, additionally they selected to execute community calls asynchronously. If some knowledge was nonetheless required for the appliance to operate, however was not wanted throughout app launch, these calls had been made non-blocking to permit the launch to proceed with out them. Blocking community calls had been capable of be safely moved to the background. Lastly, they selected to cache knowledge between classes.

21% faster startup 5% more driver sessions 

These might sound like comparatively small modifications, however they resulted in a dramatic 21% discount in app startup time. This led to a 5% improve in driver classes in Lyft Driver. With the ends in hand, the workforce had sufficient buy-in from management to create a devoted cell efficiency workstream and add an engineer to the trouble as they continued to make enhancements. The success of the initiative caught on throughout the group, with a number of managers reaching out to discover how they might make additional investments in app high quality.


The success of those efforts incorporates a number of broader classes, relevant to any group.

As an app grows and the workforce grows with it, app excellence turns into extra vital than ever. Builders are sometimes the primary to acknowledge efficiency points as they work carefully on an app, however can discover it troublesome to lift consciousness throughout a whole group. Android vitals gives a strong device to do that. It offers an easy solution to again up developer observations with knowledge, making it simpler to sq. efficiency metrics with enterprise instances.

When beginning your personal app excellence initiative, it pays to first goal for small wins and construct from there. Rigorously choose actionable initiatives, which ship important outcomes by means of an applicable useful resource funding.

It’s additionally vital to speak early and sometimes to contain the remainder of the group within the improvement workforce’s high quality efforts. These fixed updates about targets, plans, and outcomes will aid you maintain your complete workforce on board.

Additional Sources

Android vitals is simply one of many many instruments within the Android ecosystem designed to assist perceive and enhance app startup time and general efficiency. One other complementary device, Jetpack Macrobenchmark, might help present intelligence throughout improvement and testing on a wide range of metrics. In distinction to Android vitals, which offers knowledge from actual customers’ units, Macrobenchmark lets you benchmark and take a look at particular areas of your code regionally, together with app startup time.

The Jetpack App startup library offers an easy, performant solution to initialize elements at utility startup. Builders can use this library to streamline startup sequences and explicitly set the order of initialization. In the meantime, Attain and units might help you perceive your consumer and subject distribution to make higher choices about which specs to construct for, the place to launch, and what to check. The info from the device permits your workforce to prioritize high quality efforts and decide the place enhancements can have the best influence for essentially the most customers. Perfetto is one other invaluable asset: an open-source system tracing device which you should utilize to instrument your code and diagnose startup issues. In live performance, these instruments might help you retain your app working easily, your customers blissful, and your complete group supportive of your high quality efforts.

When you’re excited by getting your personal workforce on board for the pursuit of App Excellence (or be part of Lyft), try our condensed case examine for product house owners and executives linked right here.



Please enter your comment!
Please enter your name here

Most Popular

Recent Comments