DeveloperWeek 2015: Dev techies unite in San Francisco
Reporting and analysis from IT events
It may seem counterintuitive, but optimizing mobile applications and avoiding performance bottlenecks is still a significant challenge, despite the fact that delivering applications over the web has become the norm. Sure, the availability of reliable, high-speed internet connections has improved, at least for stationary devices, but the network reliability for mobile devices is still spotty and unpredictable. This means developers face a whole new array of problems. They are tasked with creating an end user experience on mobile that matches the speed and reliability of a desktop, with a fraction of the resources and a whole string of new factors that can impact performance. These challenges include network efficiency, render times, frames per second for video, and cross-app interactions.
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
Obviously, not all of these factors are under the direct control of developers. In some cases, other parties are responsible for making improvements. For example, the operating system upgrade from iOS 6 to iOS 7 brought new efficiencies in Apple's networking TCP/IP stack, and radio data handling. The evolution of browsers, devices, cloud technology, and communication networks is also refining the mobile experience.
While developers may have little control over the pace of innovation across the mobile industry as a whole, there are many areas where they do have a say in how an application operates. Understanding how application design, network availability, radio activity, and battery life all interact is an important first step. From there, it's possible to make smart choices to deliver a more enjoyable application experience.
Create a multi-pronged optimization strategy
According to Eran Yaniv, CEO of Perfecto Mobile, "There are many ways to optimize. There can be some browser caching, some local storage of heavily used resources, and so on." He advocates for testing early and often using a wide variety of devices, browsers, networks, and network conditions to fully explore the opportunities for improving QoE (Quality of Experience). Here are seven tips that may help minimize latency and service interruption for end users.
- Cache some information in the browser to speed up page load times on the client side (the efficacy of this approach will vary from one browser to the next but has improved as a whole over the past few years).
- Leverage cloud-based mobile delivery to serve up mobile content from servers and data centers that are geographically close to end users (be sure to choose an option that takes both traffic load and location into account).
- Use an HTTP persistent connection to reuse a TCP connection for multiple requests and responses (set keep-alive sessions to a short time period such as 5 minutes and only use them when necessary to avoid excessive radio activity).
- Use push delivery and notifications instead of polling whenever possible. Aggregate inbound and outbound requests into as few network calls as possible (every transfer comes at a cost in terms of radio use and battery life).
- Have the app provide instant feedback of some kind via the user interface even if the application is still waiting for a response in the background. Simply acknowledging that an action has been initiated is often all that is necessary to make users feel that an app is fast.
- Remember that Wi-Fi has very different parameters than a mobile network. For streaming applications, consider prompting the user to switch over to an available Wi-Fi network for a better experience.
Testing tips for optimizing mobile
Obviously, the only way to determine whether optimization efforts are effective is through testing. It's not simply a matter of figuring out what works, but what works best. This is done using a five step process: split, test, measure, choose, deploy. Steven Collins, CTO of Swrve, covered this topic in some detail in his presentation on mobile app optimization at Casual Connect Europe. According to Collins, "There are particular challenges presented when you're looking to do A/B testing or split testing on mobile devices."
For example, users in the mobile community have little tolerance for unexpected changes—or the perception that someone else is getting a better service than they are. While this concept applies very directly to mobile gaming (Collins' area of expertise), it is also a consideration for mobile users in general. Because of this, Steven says that some forms of testing may best be confined to new users only, or to new versions of an app. This makes it less likely that existing users will complain about inconsistency in their experience.
He also pointed out that testing should concentrate on areas that can actually be affected by the development team in a timely manner. "There's no point in testing if you're not prepared or able to take an action on the basis of the test results. If you can reduce the risk and latency of running tests to nearly zero, then you'll empower your testers to get testing. The goal here is to get to a point where the downside of a test fail is significantly outweighed by the potential advantages of a test success." In other words, consider the areas where improvement is feasible within the existing development timeframe before committing resources to extensive split testing. With so many factors at play in the mobile development space, it's important to optimize wisely.