10 Tips to Improve Mobile App Performance
3.5 billion people around the globe own a smartphone(Base on Techjury reports). We live in a reality where the global smartphone market contributes 77% of the top 10 vendors.
Mobile apps are what make a smartphone worth using. Convenience, simplicity, and variety are what drives the market forward. Companies who don’t have a mobile presence are falling behind, while their peers getting a momentum.
As clear as the world mobile future is, talking about it is one thing, understanding why mobile apps are so important is another. Out of the verity of subjects, there are only two questions worth asking here:
- Why do companies focus on mobile app performance optimizations?
- How to improve mobile app performance?
My name is Ilya Gazman My goal is to educate and improve mobile development for building smarter solutions. Mobile app performance is the key ingredient in succeeding in this mission.
Why do companies focus on mobile app performance optimizations?
Mobile app performance optimization is important beyond imagination. People can feel the difference between half and one second of loading time. Sometimes it’s the difference between a person clicking on the home button or continue to interact with your app. As more companies become aware of mobile app performance’s importance, the speed of renovation and market standards keeps changing rapidly. Among app features, it is now common to see loading times and other performance metrics. If companies were highlighting app stability in the past, now it comes as given, and the focus is shifting to performance.
The 2020 expectation for the mobile app cold-start is under one second. There are cold and warm starts, cold-start is when the app is launched for the first time, and worm-start for consecutive launches. A worm-start is expected to happen within a half-second. It is also referred to as instantaneous-start.
Those standards are the fruits of the top industry companies that spend much effort on app optimizations. It makes it very hard to compete with them, and they can grow faster. Facebook placed 12 engineers to work solely on its iOS cold-start app optimizations(base on Natansh Verma post from 2015). Swiggy’s mobile apps stopped their entire business for three months, working on improving their cold-start app time. You can even find real estate companies making posts about their cold-start app time improvements.
The bottom line to all of this is user experience. By investing in Mobile app performance, you improve retention and engagement and ensuring your place in the race.
How to improve mobile app performance?
“In 2018, global mobile app revenues amounted to over 365 billion U.S. dollars. In 2023, mobile apps are projected to generate more than 935 billion U.S. dollars in revenues via paid downloads and in-app advertising,” based on Statista reports.
I am here to share some of the tips and strategies used by the giant companies to get ahead of the Mobile app performance race. By prioritizing mobile app performance, you are guarantee to win engagement and conversion.
Mobile app performance strategies
Below you will find a short list of bullet points about the key strategies in mobile performance optimizations. Those are the basic principles that will help you to build your app towered the market, quit high standards.
Device Performance
- Device compatibility
- Take advantage of your execution environment. What works for Android might not work for iOS. You may even need special APIs for each of the platforms.
- Use the latest supported features on the device you are running on, be sure that your competitors do that.
- Use all the device cores you have access to. Paralyzation is the most important key in optimizations.
- Cold startup time
- Could you give it a priority? Don’t limit the cold startup optimizations for your front-end engineers only. Networking, offline support, and even design, they all can affect your performance.
- Memory consumption
- Don’t try to limit the memory you are using. Instead, use it smartly. Optimize towered, efficient caching, and minimal runtime allocations.
- Battery consumption
- The battery is a function of change. Each time you are making a new network call or using CPU, you shorten the battery life. Try to minimize the work of your app to only what it’s truly needed. Don’t cache in the background or sync with your backend unless you absolutely need it. Also, note that both iOS and Android will let the users know who are the apps that consumed most of the battery.
- App in background
- Many restrictions have been placed by the iOS and Android frameworks to limit what the app can do in the background. Unlike in the past, it is pretty safe today to run your app in the background without concerns of negative feedback from the users. The only thing you should take care of is the battery life, as mentioned above.
- Integration with other services (location/GPS, social media, Wi-Fi)
- There are many services to choose from, make sure you trust than the one you choose to use. Your service review should not be light. It is extremely easy to fake open source reviews today.
- Just like with third parties, there are options for native APIs as well. Some of them are only there for backward capabilities, some in the beta release, or even alpha. Make sure you are using a stable API, even if it’s not the latest.
- Make your app accessible for people with limitations.
- Make your font size big enough so older people can see it.
- Make your color selection friendly to color blind people.
- Add subtitles for videos so people with nonperfect hearing can fallow
- There are also native APIs for people with limited vision and blind people.
- There are many UI/UX standards today that will help you expedite the creation of your app. They will also help the users to learn your app faster. It is a good idea to fallow those standards.
Network Performance
Starlink is going to change the game with it’s planned global launch in 2021. It will help reduce the gapes we have today in the world internet connection, but you should not assume that it will solve all the problems. It is very beneficial today to invest in users with poor network connection, and it’s probably not going to change soon. However, Starlink defiantly makes us wonder.
- Speed compatibility
- The competition gets smaller when it comes to users with limited network capabilities. You will have big wins if you build your app in a way that will allow them to use it.
- UDP
- As a native application, you have the privilege to use UDP over TCP. UDP is incomparably faster than TCP, but of course, it comes with a cost. Many new frameworks were released recently that will allow you to take advantage of it.
- Connectivity
- It would help if you built your API so that the client could easily recover from a short connection lost. Starlink is not going to change that.
Server/API Performance
- It would help if you built your API so that the client could easily recover from a short connection lost. Starlink is not going to change that.
- Security
- You are paying three times more for the first server request due to the encryption round trip protocol. Make sure that both your server and the client support TLS 1.3 to reduce this cost.
- Use JSON
- This is quite unusual advice, to be honest, but JSON becomes such a huge standard that it’s going to be impossible to avoid using it when dealing with third party services. So to improve code reusability on both server and client, make sure you only deal with one protocol, which should be JSON.
- Server downtime
- One day your server will go down. This is inventible. The question is, do you got a backup? Make sure the answer is YES to this question. It includes your load balancer, the database, and all of your services.
10 Mobile App Performance Tips
- Content delivery network (CDN): CDN improves the delivery of the static files to your users. When choosing a CDN provider, it’s important to check that it covers the countries where your users are coming from. Also, since you will not be the one who will deliver those files to the users, it’s important to make sure that the CDN provider offers DDoS protection and a firewall. You don’t want to be knocked out by noobie hackers.
- Resource optimization: Use vector graphics where ever you can. In the past, there was a concern of CPU vs. Network performance regarding using vectors, but today the CPU costs are redundant in that aspect, and the benefit of the Network is totally worth it.
Vector graphic includes not only images but also gifs and animations. For nonvector resources, use WebP. WebP is a modern image format that provides superior lossless, lossy compression compared to JPEG and PNG. - Focus on the core features of your app: Sometimes it’s compelling to make a two-second preloader with your company logo or add a fancy animation for the screen entrance. While those UI features will make you love your app better, they will not help you grow. Performance is your most promising bet while investing in the future of your app.
- Work with templates: Build your design in a way that will allow you to easily reuse app resources across the different screens and popups of your app. It’s a triple performance win. You save on memory as you reuse the app’s live resources, you save on development as you reuse code, and your users will learn your app faster as they will become familiar with your templates.
- Lazy loading vs. prefetching: You may come up with an optimal solution in your office for efficient app loading. But it doesn’t mean that it’s going to be optimal for everyone. Prefetching could be slow if you are on a slow network or memory-expensive if you are currently running multiple apps. Make the loading desitions in run time, be aware of your working environment, and maybe even the user patterns. It will also be a good idea to ask for advice from your CDN provider if they offer this service.
- Offline mode: We have all been in a subway or an airplane at some point in our life. Actually, I am on a beach right now with no WiFi connection. Think I would use Google Docs if they would not support offline mode?
- Batch calls: Reduce the number of calls to the back end. It is cheaper to aggregate calls together into one big server response instead of making multiple small calls, as you be paying with a round trip. This is especially true if you use one of those UDP frameworks like HP-Socket, which makes the batch size even cheaper.
- Work with testing tools: Many mobile testing tools can automate simple performance testing before you go to production. It will detect memory leaks, examine your network, and measure your startup times. Tools like TestComplete, Calabash(Android, iOS), and more.
- Application size: Application size will affect the install and the download time of your app. If it becomes too large, users may delete it to save space. It was a big concern in the past, but today with better storage and networking, app size matters less. Still, it is better to be on the lower end of the curve as it can only benefit you.
- Mobile performances expert: Get a mobile performance expert onboard, someone like me. Together we can examine your current mobile performance solutions and build a plan to take your app to the next level.
Bottom Line
Mobile app performance is crucial for user retention rate, ratings, number of downloads, conversions, and revenue. By committing to creating a high-quality app that meets 2020 mobile performance standards, you open the doors for fast growth and a global scale.