App Performance in iOS

Joe Williams
9 min readMay 13, 2019

This blog post is an extension of a talk I gave at Mobile Monthly in Leeds at the Sky Betting & Gaming offices. If you’re local to Leeds, come down to the next one!

Why?

App performance is hugely important for developers, but can sometimes go overlooked. Often, we are in a position of privilege meaning we only really ever run our apps on the highest spec devices, with huge data plans. This means we don’t really see the implications of not being massively performant.

I was recently working on a project that included flying a drone. I had an app which took raw image data from the drone’s camera feed, processed it and scanned a barcode of a parcel. I needed to ensure that an Out of Memory event didn’t occur, leading to a potentially fatal crash where somebody could get hurt. As a result, I needed to ensure the app was as performant as possible. Now, in even more recent projects, app performance has become one of the centre-most considerations when developing a feature.

Knowing where to get started can be overwhelming, though. The aim of this talk, therefore, is to show you how to profile your app and fix common bugs.

Three-Pronged Approach

When doing any kind of development work, it’s important to take a relatively logical approach to solving problems. It allows us to retrace our steps, and keep an eye on changes we’ve made. When looking for performance bottlenecks, I like to split this into three reasonable steps: search, fix, test.

Searching with Instruments

Let’s take a look at a common example. I have a demo app called Twinstagram that shows high resolution images, and how many people have liked the image. However, the scrolling performance is incredibly laggy, and on older models, is totally unusable.

As you can see on a 5s, it’s really hard to use this app. In this situation, we could go ahead and make…

--

--

Joe Williams

iOS Engineer @ Sky Betting & Gaming | Indie Dev @ Expodition Podcast App