Why Mobile Apps Performance Matters

Android & iOS platforms have around 4.5 billion active devices with different performances. Here’s our work on this awesome topic!

Victor Oliveira
Mercado Libre Tech
7 min readSep 30, 2021

--

Hi hi ;)

You can also read this story in portuguese here!

Why mobile apps performance matters

“I keep six honest serving-men (They taught me all I knew); Their names are What and Why and When And How and Where and Who.”

Rudyard Kipling

Have you ever wondered what motivates you to keep giving your best every day? As children, we ask adults countless questions attempting to understand the world we live in. At some point, we refrain from asking those questions and sometimes, even in our careers, we overlook important details of our daily lives. For example, to uphold a high professional performance, detailed improvements are needed — the same kind of improvements and care that we apply to our technological stack at Mercado Libre.

One of our cultural principles is to be in Continuous Beta. Here, as one of the many interpretations that Kipling’s poem suggests, it is necessary to understand the core of these six questions so that our applications can perform optimally to meet our users’ expectations and fulfill their scalability role. At Mercado Libre’s mobile apps universe, those who provide fuel in search of excellence are millions of active users on our apps. Today, I come here to tell you what performance means to our Android & iOS platforms, why we have a team dedicated to this area and how we regularly put some improvements into practice.

“Performance can mean a lot of different things to different people. When it comes to mobile apps, performance can describe how an app works, how efficiently it works, or if it was enjoyable to use.”

Doug Sillars

Currently, between Android and iOS, there are about 4.5 billion active devices. The analysis below depicts how fast a screen is presented. It is possible to notice that devices from different manufacturers, or even a group of the same model, can vary their response time. For instance, the Galaxy A10 may take up to 5 seconds to load this screen, but on average it takes 1.67 seconds. It’s important to keep in mind that also several other non-hardware related elements have an impact on this data.

A performance dashboard of our startup flow extracted from Firebase Performance Monitoring shows different performance values depending on user’s device.

So, if performance has different meanings depending on the device, does its meaning also vary depending on each developer’s viewpoint?

I believe it is unanimous among the developers’ community not to demand much when talking about performance. It would be good enough if our application did not suddenly close in front of a user, right?

Production crashes: A nightmare!
How every developer feels about production crashes

Theoretically, it is a simplistic way of thinking, yet profoundly true. In practice, as developers, we want much more.

“Most people are primarily concerned with execution speed, although program footprint and memory usage can be critical for small embedded systems.”

WG21

Mobile devices have memory and processing constraints just like embedded systems, so we tend to follow WG21’s motivations. Not only to talk about hardware limitations, in my humble (developer) opinion, but also when it comes to priorities, sometimes we let performance issues be labeled as technical debt.

For instance, I remember when back in early 2020, I had planned to solve several technical debts at Mercury App. Mercury is a highly scalable and mostly backend controlled app that makes up the Warehouse Management System, which is part of our Logistics solutions. Even though debts were once planned, Covid-19 sped up the delivery of Consumer Packaged Goods, forcing our company logistics strategy to adapt. By that time, customers’ demand for those products was so high that our mobile backlog was put on hold till CPG release so that we could all focus on backend development.

Right in the beginning of July, we started to reduce crashes and warnings which meant approximately 75% fewer events on Mercury by the end of the year. This drop is even more impressive when you take into account the significant traffic increase during this period, whether due to our logistics network expansion or to overall consumption engagement.

Mercury’s error sampling

Make no mistake: performance is an issue of big concern and we must prioritize it whenever possible.

A brief survey of negative reviews about our main applications shows that, in a simplified way, it is possible to categorize customers’ complaints into User Experience, Performance and Business Rules. In particular, the lack of performance can lead to users’ loss of application reliability as well as displeasure in using it, not to mention business disadvantage from the company’s perspective for not being able to trigger buzz marketing. In most cases, as we’ll see below, it even leads to the app being uninstalled. Among all possible user actions, this last is surely the one with the worst impact on any business that prioritizes mobile platforms.

Examples of Mercado Libre’s low rate comments at Play Store

Thus, It is important not only to listen to our customers, but to give special attention to their interactions. A research released in 2015 by Dimensional Research, under the sponsorship of Hewlett-Packard, showcased the level of dissatisfaction of mobile users in relation to performance. Among 3011 interviewees in Europe, United States and Canada, their analysis concluded that:

Mobile App Users are impatient

  • 61% expected apps to start in 4 seconds or less.
  • 49% expected apps to respond in 2 seconds or less.
  • 96% evaluated apps’ performance from important to critically important.
App response survey presented by Dimensional Research in partnership with Hewlett-Packard
Dimensional Research sponsored by Hewlett-Packard — App response
Performance importance survey presented by Dimensional Research in partnership with Hewlett-Packard
Dimensional Research sponsored by Hewlett-Packard — Performance importance

Users are intolerant of overall issues and are quick to abandon mobile apps

  • 80% indicated they would only attempt to use a problematic app three times or less.
  • 53% uninstalled or removed a mobile app with severe issues like crashes, freezes or errors.
  • 36% would stop using a mobile app due to heavy battery usage.
Common crash & slowness reactions presented by Dimensional Research in partnership with Hewlett-Packard
Dimensional Research sponsored by Hewlett-Packard — Common crash & slowness reactions

In an attempt to avoid this statistic, apart from engaging all developers into a collective effort, we have one team fully devoted to improving the performance of our mobile universe. Every day, we seek to apply good practices, some of which we will describe below:

  1. We monitor numerous tools and also automate alerts in order to prevent harmful events to users.
Potentially harmful events being measured at Mercado Libre

2. We value build statistics as a way to reduce costs, especially for idleness reasons.

We did a lot of work on improving the build time of the Mercado Libre Android app, and we still have a lot of opportunities to work on
Build time of our Mercado Libre Android app in a seven days period, extracted from Gradle build statistics at CircleCI

3. We optimize builds by avoiding dependency redundancy.

Implementation over api usage might enhance build time performance

4. We use flavors to granulate settings and features.

Flavors are recommended to specify build details

5. We unify the development experience to ease other developers’ work.

It is important to avoid boilerplate code identifying common objectives among many teams

6. We remove legacy code whenever identified.

Spotted file created in 2016 and left behind after migration to newer version

7. We download resources on demand, such as heavy images, rather than pack them within the apps.

Removed image resources that should be downloaded during app’s usage

8. We review Proguard rules to enforce weight reduction.

Proguard rules being scaled to optimize generated bytecode

9. Obligatory setups are sorted by priority to reduce the app startup time.

Preliminary configurations should be prioritized to decrease startup time

Semantically speaking, most of these examples were taken from the Android platform. However, in essence, we can porter them to other platforms bearing in mind the same purpose.

In short, it is possible to conclude that performance does have different meanings and the search for its perfection demands constant work from different perspectives.

And you? What’s your personal or professional performance story? Tell us more about your perspectives in the comments and stay tuned to learn more about what we’re working on to keep improving the performance of our mobile apps!

References

  1. I Keep Six Honest Serving Men — A Poem by Rudyard Kipling
  2. β Contínuo: Empreender é estar em constante mudança
  3. Keynote I/O 21
  4. 9 to 5 Mac: Apple hits 1.5 billion active devices
  5. Technical Report on C++ Performance (WG21, 2006)
  6. High Performance Android Apps (SILLARS, 2015)
  7. Failing to meet mobile app user expectations (Dimensional Research, 2015)

--

--