6 ways to make your app feel fast (and 3 things not to do)

shree thaanushree thaanu
4 min read

We all wish our app to be faster and building a faster one isn’t rocket science you just have to take care of these things while you code your app on a daily basis. Also by end of this blog, i would list tools that helped me in building apps faster.

Memory allocation:

Allocating the memory is the finest way to get into the core of your app, you directly have a grip of your app’s memory would let you optimise the way objects created, used and destroyed properly. We have ARC ( Automatic reference counting) which helps in doing this. Arc does the job of cleaning up most of the memory but sometimes it won't and here is where we pitch in. Instances like relationships holds the memory from being de-allocated or denit() not getting called. Fixing this is a simple yet (a word here) using weak ref over strong in case you don’t need a huge impact, unowned is one other way. creating multiple obj with reference to previous objects maintaining a chain relationship is a bitter way.

App Thinning:

Apple gave us the App Thinning in hand to make our life easier, before 2015 its a dream and i still see people not prioritising this. Appthinning happens in 3 ways Slicing, Bitcode and On-Demand Resources.

Slicing let you get a variant that contains only the executable architecture and resources that are needed for the target device not the universal binary (since iOS 9). This is a major breakthrough for Apple in 2015.

Bitcode enables you to recompile your app to reduce its size. The recompilation happens when you upload your app to App Store Connect or export it for Ad Hoc, Development, or Enterprise distribution(e.g: possibly downsize executable sizes). To do this you need to enable bitcode in build settings.

On-Demand Resources are resources such as images and sounds that you can tag with keywords and request in groups, by tag. The App Store hosts the resources on Apple servers and manages the downloads for you. The App Store also slices on-demand resources, further optimising variants of the app. ODR’s happen in Background to make your app faster, reduces app sizes and make disk less congested.

Threads :

Handling threads effectively would be a great way to make your iOS app looks more cooler like doing heavy works on background, responsive UI updates in main, multiple calls to be avoided incase you need try async calls or when you need it one by one use dispatch group and enter one by one(I personally isn’t a fan of doing multiple calls for a function). Make use of thread priority.

This also comes with some dis advantage like cost of using threads where you have stack size, thread allocs and kernel dependency. you also have to have an eye on stack trace. Okay i have wrap it right here and i’ll discuss more about it in next blog. Long story short

Threads help you in maintaining your app responsiveness be it back or main.

Launch Time :

Everybody has a first impression, likewise your too has a first impression. If your app has a huge launch time it’s depress the user and have a negative mindset before even they use it. This isn’t just about the launch screen, it can be launch screen, initial views, too much data for home screen. You don’t need to show all out once. Use simple yet attractive views with minimal data and then try to paginate or any other ways to load more data. Use instruments to have an audit on what’s happening in launch.

Clean code practice :

Yes, it directly affects your app performance. I have written blogs on clean code practices. so here i’m just providing the abstract of those. Write production ready code in that case you don’t have to work on it at last. Here is the link for the blog. Make use of caching to avoid reloading again and again or reduce the frequency of the operation like did scroll or will display animation, these happens frequently in the app. I also suggest using re use identifiers.

Monitor Analytics and Report:

This must be done routinely to see the user interaction metrics and crash report and disk usage. This helps the developer in understanding whats happening in users devices and can be rectified and taken in as priority. While developing the app we must take instruments as a priority each time you are working on some complex app. Below i have mention few tools that i use for routine check.

Stripping down the major issues in an iOS apps be like :

Feel free to ping me if you feel struck or need more support. Let me know in comments if you felt it’s useful and feedbacks are welcome 🙌.

Follow me on other social networks too.

LinkedIn: https://www.linkedin.com/in/shreethaanu-raveendran-7a6275b2/

Github : https://github.com/shreethaanu

Instagram : https://www.instagram.com/shreethaanu_blogs/

Portfolio : https://strlabz.com

Patreon : https://www.patreon.com/shreethaanu

If you like my post and wanna see more support me ☕️

4
Subscribe to my newsletter

Read articles from shree thaanu directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

shree thaanu
shree thaanu

iOS Developer | XR Researcher & Design Technologist