Micro Focus is now part of OpenText. Learn more >

You are here

You are here

The essential guide to improving mobile performance

public://pictures/zecc4hr7_400x400.jpg
Matthew David Digital Leader, Accenture
 

Mobile performance is an increasingly complex domain but generally includes four main components: app performance, network performance, server performance and API performance. By focusing on these areas, you can address two key metrics: Rendering time of the content on the screen (such as a web page loading or an app starting), and the time to consumer interaction with the content on the screen.

Let's take a closer look at how each of these areas of performance can be optimized to deliver a great user experience.

App and web performance on the mobile client

The first step in mobile performance optimization is the app on your phone. HP's Global Lead for Mobile Solutions, Antoine Aymer, always starts with the following question: "Are we talking about mobile web performance? Or are we talking about hybrid or native app performance? The reason is that the underlying infrastructure can share elements but also have significant differences."

Mobile web, native, and hybrid apps have different infrastructure.

—Antoine Aymer, global lead for mobile solutions, HP

Aymer's observation is important. Mobile web is the first point of contact most consumers will have with a company, but repeated engagement will often happen with an app. Consider your bank: you will connect to their mobile website to test out their services but will quickly convert to using a native app. There's one consistent fact—consumers using an app will spend over six times the amount of time using your services than they will on a mobile-optimized website.

The bottom line is that both the web and app experiences are important, and you'll need to support the performance of both.

How mobile web will impact performance

The goal of mobile web optimization is to present content as fast as possible. You'll want to keep your entire web content down to very small packages. Maximiliano Firtman, author of High-Performance Mobile Web, is aggressive in his file size goals. "The most extreme technique is to fit everything for the above the fold (ATF) content (the first visible part of the screen) in one HTTP response of 14 KB. If you're serving your files gzipped, then it means an HTML with CSS and images in a package of around 70 KB. It's perfectly possible to serve your home page or initial content within a second."

You can fit everything above the fold in one 14 KB HTTP response.

—Maximiliano Firtman, author of High-Performance Mobile Web

The benefit of keeping files small is twofold. The first advantage is faster download times; the second is screen rendering. Many smartphones simply are not as powerful as the desktop computer. Smaller framework packages will help decrease the time needed for screen rendering and improve users' perception of website rendering time.

How hybrid and native apps will impact mobile performance

An app, whether hybrid or native, will perform differently from a website. A website requires a browser, Internet connection, and a web address. An app does not. Once on a phone, an app can work offline, receive notifications, run processes in the background, and interact more closely with the mobile operating system.

It's the deeper connection to the operating system that now gives mobile developers opportunities to improve user perception of mobile performance.

Here are examples of what you can do today:

  • Uber offloads information securely to the native client on a mobile phone as a way to back up their data centers.
  • Apple introduced to iOS 9 a concept called "app thinning" that reduces the size of an app specifically for a target device.
  • Content for an app can be proactively loaded depending on where the consumer is in the app. For example, if you have a section with a series of articles, you can add code to download the next article as the consumer reads the previous article.

Apps give you the opportunity to keep an appropriate amount of data on the device. The speed of an app is now a matter of perception. Take advantage of APIs, frameworks, and toolkits in the mobile operating system that are built to improve the perceived performance of an app.

How networks impact mobile performance

Data leaving or arriving at a phone must connect to a very different set of networks than on a desktop PC. "Consider that a typical PC takes 30 ms to connect to a server," explains Todd DeCapua, TechBeacon's chief technology evangelist, "whereas it takes a mobile device typically 300 ms to connect. That is a 10x slower connection. The result is a 50 percent increase in your back-end infrastructure. If you are already running at a 65 percent utilization for your PC traffic and then add just five percent mobile traffic, you will crash your data center."

A PC takes 30 ms to connect to a server; a mobile device takes 300 ms.

—Todd DeCapua, chief technology evangelist, TechBeacon

The performance challenge here is the speed of light. PCs typically have stable network connections. Mobile devices do not. Some reasons for this latency include:

  • People move when they're using their phones, preventing a consistent connection from being established.
  • Wireless network speeds fluctuate from zero connection to EDGE, 2G, 3G, CDMA, and LTE.
  • Wireless connections are shared—this is why data connection at a conference can be almost nonexistent.

The need to manage latency isn't going away. Don't believe all the hype phone carriers spread about how fast their LTE network runs. An exercise that demonstrates the volatility of a network is to take out your phone and walk a few blocks down a city center. You'll likely see the bars of connectivity leap from zero to five, and you'll see your data connection jump all over the place, too.

Managing performance in your server code

Each HTTP request sent to your server potentially reduces mobile performance. There are many methods of reducing HTTP calls. Some include:

  • Develop for REST versus slower and larger SOAP services.
  • Format data in JSON packages and leverage modern, responsive web design frameworks, such as AngularJS, as templates to display content.
  • Stream video from dedicated media services.
  • Update HTTP services to the faster HTTP/2.

The core web server protocol is HTTP. The goal of HTTP is to deliver content from the web server to the web browser. The problem is that the connection is a single-threaded stream. Think of it as people getting on a bus one at a time. What happens when the third person takes too much time to find the right amount of money to pay for the bus trip? Everyone behind the third person has to wait. HTTP/2 addresses this issue by splitting bidirectional requests over a single TCP/IP connection. Both the server and the web browser must support HTTP/2. (The good news is that all mobile browsers support HTTP/2.) In other words, everyone can keep getting on the bus while the third person searches for the correct change. The overall result is a dramatic improvement in performance.

Managing performance for your API

APIs form the backbone of work for many mobile solutions. The architecture of an API effectively allows developers to use the same APIs on a website, mobile app, smart car, smart TV, or wristband app. In other words, APIs are the glue that hold content and business logic together.

There are key strategies that you'll want to leverage to improve performance, including content delivery networks (CDN) and software containers. Essentially, a CDN is a collection of connected cache servers across global data centers that keep content close to the geographical location of the person requesting the website. The result is the high availability of content.

Dynamic content can now be more effectively scaled using containers. A software container is a virtualized environment that instantiates software with an operating system, but that is kept separate from the hardware. A typical example is a cloud service. The container holds the software and can then be scaled to any amount of hardware to meet demand. A popular software container is Docker.

How the IoT is compounding the issues of mobile performance

The Internet of Things, or IoT, is the new frontier. The first wave of IoT devices to hit the market were health bands, watches, smarter cars, and smarter TVs. The goal for each of these devices is to provide and receive data in a new experience specific to the location of the consumer, such as checking the time of my next meeting on my watch.

In many ways, IoT is the next area for performance. Malcolm Isaacs, HP evangelist, sees the following scenario adding to the performance strain, "Today I get email and text messages coming to my watch, but what if I have left my phone, which is sending me the messages, in another room? You have now introduced a new level of latency. It may be only milliseconds—say one or two hundred—but this keeps adding up. Your watch takes time to connect to your phone; your phone takes time to connect to the cloud; and the cloud takes time to receive the data and then send it all back."

The expansion of IoT solutions will be driven, as with smartphones, by convenience and price. Apple is expected to sell more Apple Watches in the first year on the market than iPads sold in their first year. Rather than reacting to the IoT, plan your infrastructure to expect the IoT.

Choosing the right tool to manage mobile performance

There are some tools and services that can be used to manage the different stages in a four-tier mobile architecture. The application performance management (APM) solution you choose should provide specific diagnostic reports that convert into clearly defined actions to improve performance across traditional enterprise environments and the cloud.

The value of these tools is to give you data from different points of view. New tools and companies are emerging to address—in great detail—different segments of your mobile solutions, and it's worth taking regular pauses to understand if new tools are worth adding to your monitoring services.

Mobile performance isn't a one-time task

Mobile performance management isn't easy. There are many risks that need to be managed to meet the expectations of consumers. As Isaacs stated succinctly, "Performance is not something you notice. If it is doing its job well, then it is transparent."

Performance is not something you notice. If done well, it is transparent.

—Malcolm Isaacs, senior technology evangelist, HP

Firtman adds to this point, saying "performance MUST be your priority number one when talking about mobile and, therefore, you will need to change the architecture of your content to fit this goal." To that end, it's worth considering the following: the world is now mobile first, and the number of connected devices is growing exponentially. It's easy for a consumer to switch. Each piece of the mobile architecture must be poised to deliver the information your customers need, wherever it is that's being consumed. Don't lose customers due to a disappointing mobile experience.

Keep learning

Read more articles about: App Dev & TestingApp Dev