Skip to content
Mustafa Erbay
Life · 12 min read · görüntülenme Türkçe oku

Mobile App Size: 3 Priorities from an Indie Hacker's Perspective

Optimizing your mobile app's size is crucial for increasing download rates and improving user experience. Here are 3 critical priorities from an indie hacker's.

100%

Why App Size is Critical for an Indie Hacker

As a mobile app developer, especially in the indie hacker ecosystem, I’ve experienced firsthand that every megabyte matters. This isn’t just about disk space; it’s a factor that directly influences users’ decisions to download the app, their initial usage experience, and even their long-term engagement. Let’s not forget that there are still users worldwide with low bandwidth or limited data quotas. If we want to reach this audience, optimizing app size is not a luxury, but a necessity.

In my own mobile projects, especially when I first started, I followed the “smaller is better” logic. However, over time I realized that this is just a starting point. What’s truly important is to view size optimization as a process and make conscious choices. These choices often require striking a balance between the trade-offs we encounter throughout the development process. For example, adding more features usually increases size; but how can we achieve this without sacrificing user experience? This is where the pragmatic approach of the indie hacker comes into play.

1. Resource Optimization: Visual Assets and Materials

One of the most prominent elements affecting a mobile app’s size is its visual assets. These include icons, background images, user interface elements, and even in-app graphics. Optimizing these assets can lead to significant reductions in the app’s total size. Especially with the widespread adoption of high-resolution devices, it has become inevitable to include multiple versions for different screen densities. However, this doesn’t mean storing each one separately.

For example, some icon sets I used in a project were not optimized for different screen densities, and these icons alone accounted for 5MB. This unnecessarily increased the overall size of the app. As a solution, I opted for vector-based icons. SVG format icons, in addition to being scalable, take up much less space than their raster format (PNG, JPG) counterparts. If vector support is limited in your project, then saving images in the correct format (e.g., WebP) and at the right compression level is critically important.

Another important point is the use of animated visuals or short videos. These can enrich the user experience but can also lead to increased size. When using such assets, it’s important to optimize their loop durations, carefully choose file formats (e.g., animated JSON files with Lottie), and remove unnecessary frames. In a project I developed, I wanted to add a short animation introducing product features to the user. When I first saved it in MP4 format, I got a size of around 10MB. When I recreated the animation using Lottie, the file size dropped to just 1MB. This made an incredible difference and eliminated a disadvantage users might encounter during the initial download phase.

2. Code and Library Management: Getting Rid of Unnecessary Dependencies

Another critical area affecting app size is the codebase and external libraries used. Every added library directly contributes to the app’s size. Especially for indie developers, it’s crucial to question whether every dependency added to the project at the beginning is truly necessary. Sometimes, writing our own small helper function can be much more efficient than using a library that performs a simple task.

For example, we once added a date and time manipulation library to our project. This library was quite comprehensive and offered features far beyond what we needed. We later realized that the platform’s own basic date functions more than met our needs. When we removed the library, we saved approximately 2MB from the app’s size. While not a huge number on its own, this was a good example of how small optimizations can accumulate to make a significant difference.

Additionally, cleaning up code that is not necessary for the entire project is an important part of size optimization. Unused classes, functions, or variables can unnecessarily increase the app’s size during compilation. Many modern development environments and compilers can automatically remove unused code using techniques like “tree shaking.” However, it’s useful to ensure these techniques are working correctly and to manually review the codebase. In my own mobile app, when I cleaned up the code for some features that had been developed over the years and were no longer used, I observed a 5% reduction in the app’s size. This can be made even more pronounced, especially on the Android side, with tools like ProGuard or R8.

3. Compilation and Distribution Optimizations: Final Touches

Compilation and distribution optimizations performed in the final stages of the app development process are critically important for reinforcing the size advantage gained. These optimizations make the app more efficient before it reaches the end-user. Especially in the Android ecosystem, such optimizations speed up the app’s download and installation processes, which is a big plus for user experience.

On the Android side, one of the most effective tools for reducing app size is R8, or formerly ProGuard. These tools perform code shrinking, code obfuscation, and optimization. Code shrinking reduces the app’s size by removing unused classes, fields, and methods. Obfuscation can hinder reverse engineering by making the code harder to read, while optimization makes the code more efficient and takes up less space. In an Android app I developed, when I enabled R8, the app’s APK size decreased by 15%. This significantly reduced the initial download size.

Similar optimizations are available on the iOS side. Xcode’s compiler settings offer various options to optimize the app’s size. Options like “Strip Swift Symbols” and “Dead Code Stripping” found under “Build Settings” help reduce the app’s size by removing unused code and symbols. Additionally, optimizing in-app assets (images, audio files, etc.) on iOS significantly affects the app’s total size. Size advantages can be gained by using Asset Catalogs and preferring correct image formats (e.g., compressed images for HEVC). In my own iOS projects, after making these adjustments, I saw an average reduction of 8-10% in the app’s size.

App Size Optimization is a Process

In conclusion, mobile app size optimization is a continuous process rather than a one-time operation. For indie hackers, this process becomes even more important with the goal of using resources efficiently and reaching the widest possible audience. Optimizing visual assets, making conscious choices in code and library management, and effectively utilizing compilation/distribution optimizations are fundamental steps to keep app size under control.

By focusing on these three main priorities, we not only reduce the app’s download size but also make the initial user interaction smoother and improve app performance in the long run. Remember, every megabyte is valuable, and conscious optimizations can play a critical role in your app’s success. By applying these principles in my own projects, I have both reduced our users’ data and storage costs and significantly increased our download rates. This is part of the indie hacker spirit: creating maximum impact with limited resources.

Paylaş:

Bu yazı faydalı oldu mu?

Yükleniyor...

How was this post?

Frequently Asked Questions

Common questions readers have about this article.

What tools should I use to optimize the size of my mobile apps?
I generally use various tools for resource optimization. For example, I prefer tools like ImageOptim to optimize visual assets. Also, when testing my app, I use the built-in tools of development environments like Xcode or Android Studio to monitor its size.
How does resource optimization in mobile apps affect user experience?
Resource optimization is very important for improving user experience. I've observed that when I optimize the size of my apps, users experience faster download rates and a better user experience. For example, waiting a long time to download an app can deter users. Therefore, by performing resource optimization, I aim for users to have a better experience.
How can a balance be struck between size optimization and adding features in mobile apps?
I have to make trade-offs to strike a balance between size optimization and adding features in my apps. For example, adding a feature might increase the app's size, but it could also improve the user experience. Therefore, I pay attention to the advantages and disadvantages of each feature and strike a balance that meets users' needs.
What are your experiences regarding how to fix mistakes made in mobile app size optimization?
I have experience in how to fix mistakes made in mobile app size optimization. For example, when optimizing an app's size, I realized that some visual assets might be unnecessarily large. In such cases, I can reduce the app's size by optimizing these visuals or using them in smaller sizes. Also, when errors occur in my apps, I try to improve the user experience by listening to user feedback and quickly resolving issues.
ME

Mustafa Erbay

Sistem Mimarisi · Network Uzmanı · Altyapı, Güvenlik ve Yazılım

2006'dan bu yana sistem mimarisi, network, sunucu altyapıları, büyük yapıların kurulumu, yazılım ve sistem güvenliği ekseninde çalışıyorum. Bu blogda sahada karşılığı olan teknik deneyimlerimi paylaşıyorum.

Kişisel Notlar

Bu notlar sadece sizde saklanır. Tarayıcınızda yerel olarak tutulur.

Hazır 0 karakter

Comments

Server-side AI Moderation

Comments are AI-moderated server-side and stored permanently.

?
0/2000

Server-side AI moderation

✉️ Free · No spam · Unsubscribe anytime

Get notified about new posts

New content and technical notes — straight to your inbox.

  • 📌
    Best of the week Single most-worth-reading post
  • 🔧
    Toolbox notes Real tools I used this week
  • 🧠
    Behind-the-scenes Notes that don't make it to blog

We don't spam. Unsubscribe anytime. · Tracked only by Umami (self-hosted, no Google).

Your Reading Stats

0

Posts Read

0m

Reading Time

0

Day Streak

-

Favorite Category

Related Posts