Optimize APK Size and Layout
One of the key practices for improving mobile app performance is optimizing the APK size. This can be achieved by using tools like R8/ProGuard to shrink the APK, removing unused assets, and splitting ABIs [1]. Additionally, flattening layouts by avoiding deep nesting and using ConstraintLayout can improve rendering speed, although it's important to note that ConstraintLayout is not a silver bullet and can sometimes be expensive in terms of performance
[1:2].
Avoid Blocking the Main Thread
Blocking the main thread can lead to Application Not Responding (ANR) errors, which degrade user experience. To prevent this, network calls, JSON parsing, and other heavy operations should be handled in coroutines or with WorkManager [1]. Properly managing these tasks ensures that the UI remains responsive.
Image Handling and Profiling
Efficient image handling is crucial for saving memory and maintaining smooth UI performance. Resize bitmaps using techniques like inJustDecodeBounds
and utilize libraries such as Glide, Picasso, or Fresco [1]. Profiling on real devices rather than emulators provides accurate insights into app performance across different hardware configurations
[1].
Monitoring and Testing in Production
For apps in production, monitoring tools like Firebase, Sentry, or Crashlytics are invaluable for tracking API requests and crashes [2:2]. Running production builds on actual devices, testing on various devices and versions, and simulating different network conditions can help identify performance issues that may not appear in controlled environments
[2:1].
Startup Time Optimization
Reducing app startup time is critical, especially for high-scale applications. Logging and measurement are essential for identifying small changes that can significantly improve startup times without requiring a complete rewrite [4:2]. Experimentation and learning from past mistakes can guide effective optimizations
[4].
Scalability and Optimization
While scalability often pertains to server-side concerns, optimizing the app codebase for rapid changes can be rewarding [5:4]. Premature optimization should be avoided, but ensuring the app can handle concurrency and multi-threading correctly is vital
[5:8]. Balancing between performance optimization and flexibility for future changes is key to maintaining a robust app
[5:9].
Android devs performance tips that saved my apps (and sanity):
inJustDecodeBounds
) and use Glide/Picasso/Fresco. Saves memory, smooths UI.These lessons came from painful debugging sessions. Got any favorite performance tricks or tools? Let’s swap ideas!
Flatten layouts sure. However, CL is not a silver bullet. It can be pretty expensive comparatively.
network calls, JSON parsing in Work Manager?
I am a server-side developer who is used to Graphite/Promethus/Influx style solutions for monitoring application performance, as well as APM tools such as NewRelic.
For our (react-native/expo) app, it performs well on the simulator and our test phones, but we get anecdotal reports of bad performance from users in production.
What do people do about this problem?
The firebsse tooling is pretty good for for monitoring api requests. Also Sentry or crashlytics will also help.
But the most important thing that I learned deploying some critical apps in production, is that the office with wifi is ideal scenario.
Make sure you are always using slower connections and throttling. We have seen apps pass QA perfectly to have he weirdest bugs and issues when testing on slow connections
Im also interested in what others have to say about detecting performance on production builds.
Off the top of my head, try building and running production builds on actual devices. You can do this on an emulator as well. Try on many devices and versions as possible, usually through emulators. I find running on wifi vs cell adds quirkiness sometimes, so include that into testing. There are ways to limit internet bandwidth to your phone to simulate that as well.
For crashes, use Sentry and attach breadcrumbs to track clicks and movement through the app.
I find Android easier to gather actual device logs off of users. Google how to find them. On iOS you can attach your phone and collect logs through xcode.
Getting performance related stats off of production devices, i havnt really looked into. If I was in your position. Id look into Firebase monitoring https://firebase.google.com/docs/perf-mon
Good luck!
Websites and mobile apps today are more than just digital platforms. They are often the first point of contact between businesses and their customers. Whether you're building an eCommerce store, a telemedicine platform, or a food delivery app, performance is not optional. It directly impacts user experience, SEO, and revenue.
In this article, I want to take you behind the scenes of how we, as an experienced app development company, approach the building and ongoing maintenance of high-performance websites and mobile apps. This is not just theory—it’s the same proven process we've applied across hundreds of projects for startups and enterprises alike.
Let’s break it down step-by-step.
Step 1: Defining Performance Goals Early On
Before a single line of code is written, we work with our clients to define clear performance goals. This includes:
Load time targets (e.g., under 2 seconds for mobile)
Time to Interactive (TTI)
Server response times
Expected number of concurrent users
Why is this important? Because performance isn't something you bolt on later. It must be baked into your product architecture from the beginning.
Stat to know: According to Google, the probability of a mobile site visitor bouncing increases by 32% as page load time goes from 1 second to 3 seconds.
Step 2: Choosing the Right Tech Stack
Performance often begins with the right tools. We customize our tech stack based on the product goals. Here are a few choices we make deliberately:
Frontend: ReactJS, Vue.js (for fast rendering and component reuse)
Backend: Node.js, Laravel, or Django (based on scalability needs)
Databases: PostgreSQL, MySQL, or MongoDB depending on structure and speed
Infrastructure: AWS, DigitalOcean, or Azure with CDNs like Cloudflare
Choosing a stack that complements the use case makes scaling easier and ensures better core performance.
Step 3: Performance-Focused UI/UX Design
Our design team is not just making things look good. They are making them fast. Here’s how:
Optimizing image sizes without losing quality
Avoiding heavy UI animations on mobile
Lazy loading assets and images
Using responsive design principles to speed up rendering
Pro Tip: A lean design = faster load times = better conversion rates.
Step 4: Writing Clean, Modular Code
Code is the engine behind your app. And just like with any engine, clutter slows things down. We follow clean code and modularity best practices:
Keeping functions small and single-purpose
Reducing dependencies
Avoiding unnecessary third-party plugins
Minifying CSS and JS files for faster rendering
Clean code is also easier to maintain later. And that brings us to...
Step 5: Setting Up a Scalable Architecture
We use a microservices-based architecture where needed to keep systems modular and scalable. This allows us to:
Scale individual components without affecting the whole system
Deploy updates quickly without downtime
Improve fault tolerance
Real-world impact: For one of our clients in the healthcare sector, we reduced server downtimes by 70% by breaking their monolithic system into smaller services.
Step 6: Continuous Performance Testing
Performance is not a one-time effort. We integrate performance testing in every sprint using tools like:
Lighthouse
GTMetrix
PageSpeed Insights
Apache JMeter (for backend/API load testing)
These tools help us monitor:
First Contentful Paint (FCP)
Largest Contentful Paint (LCP)
Cumulative Layout Shift (CLS)
Backend API response times
And we don’t just test—we fix. Every test report leads to actionable improvements.
Step 7: Proactive Website and App Maintenance
Post-launch, we offer website maintenance services. Here’s what that includes:
Regular security patch updates
Server health monitoring and auto-scaling setup
Bug fixes and technical SEO improvements
Performance optimization every quarter
CMS or framework updates (like WordPress core or Laravel upgrades)
Did you know? 70% of users say page speed impacts their willingness to buy from an online retailer. Maintenance isn't optional if you care about business outcomes.
Step 8: Using Analytics to Continuously Improve
You can’t improve what you don’t measure. That’s why we integrate analytics tools like:
Google Analytics 4
Hotjar or Microsoft Clarity
Firebase Performance Monitoring
These give us insight into real user experiences:
Which pages have high bounce rates?
Are certain devices slowing down performance?
Are users dropping off at specific steps in the funnel?
And yes, this data helps us decide what to optimize next.
Step 9: SEO + Performance Go Hand in Hand
Performance and SEO are best friends. Here’s how:
Google uses Core Web Vitals as a ranking factor
Fast load times improve crawlability and indexing
Optimized pages lower bounce rates and increase dwell time
Example: One of our B2B clients improved their organic search traffic by 48% in 6 months just by optimizing their app's load speed and structure.
We often collaborate with our SEO team right from day one. From sitemaps to schema to server speed, it's all part of the big picture.
Step 10: Client Education and Collaboration
Last but not least, we believe performance is a shared responsibility. We constantly educate our clients on:
How to avoid uploading large media files
Why content updates should follow SEO-friendly structure
What plugins to avoid in CMS platforms like WordPress
This keeps the site/app fast after we hand it over.
Final Thoughts
At the end of the day, high performance is not a luxury—it’s a business imperative. From the code we write to the designs we craft, every decision is performance-oriented. Because we know that:
A 1-second delay in page response can result in a 7% reduction in conversions
53% of mobile users abandon sites that take more than 3 seconds to load (Source: Google)
Pages that load in under 2 seconds see the highest conversion rates (Source: Portent)
So whether you're a startup founder building your MVP or a scaling enterprise with thousands of users, performance matters. And it’s our job to make sure you get it right from the start—and keep it right over time.
Is this just a copy from ChatGPT’s answer?
🚀 𝐑𝐞𝐝𝐮𝐜𝐢𝐧𝐠 𝐀𝐩𝐩 𝐒𝐭𝐚𝐫𝐭𝐮𝐩 𝐓𝐢𝐦𝐞 𝐢𝐧 𝐚 𝐡𝐢𝐠𝐡 𝐬𝐜𝐚𝐥𝐞 𝐎𝐓𝐓 𝐚𝐩𝐩 — 𝐌𝐢𝐬𝐭𝐚𝐤𝐞𝐬, 𝐋𝐞𝐚𝐫𝐧𝐢𝐧𝐠𝐬 & 𝐒𝐨𝐦𝐞 𝐏𝐚𝐢𝐧
While working on a media streaming app used by millions daily across a wide range of Android devices, I was part of a performance initiative focused on one of the most visible pain points: slow cold start time. So here’s what worked, what didn’t, and what I wish I knew earlier..
🧠 𝐋𝐞𝐬𝐬𝐨𝐧𝐬, 𝐄𝐱𝐩𝐞𝐫𝐢𝐦𝐞𝐧𝐭𝐬 & 𝐓𝐡𝐢𝐧𝐠𝐬 𝐓𝐡𝐚𝐭 𝐇𝐞𝐥𝐩𝐞𝐝:
Android has a wild variety of devices and OS nuances. Just defining "app startup time" becomes tricky — from the moment the user taps the icon to when content loads. As we had millions of data points, we could finally get a sense of where we stood. Some of the data was weird (thanks, Android ecosystem) — you never know what surprises 15k device models can throw at you.
🔍 𝐁𝐫𝐞𝐚𝐤𝐝𝐨𝐰𝐧 𝐀𝐩𝐩𝐫𝐨𝐚𝐜𝐡:
• Understand the full API call flow from app start to home render. Document it in the form of diagram, use whimsical or whatever drawing tool you know and share with team.
• Figure out what really needs to be loaded upfront and what can wait.• If you’re using a splash screen, and especially custom ones with timeouts or animations — you can use that time smartly to preload essentials for the home page.
• Dive into every section of startup code.• Identify things you can defer — analytics init, payment sdk init, etc.
• Use tools like Android Profiler, macrobenchmark, baseline profiles, and Perfetto to measure where time is being spent.Here’s a great video that helped me understand Perfetto: https://www.youtube.com/watch?v=YEX26m89fco
📊 𝐎𝐧 𝐚𝐧𝐚𝐥𝐲𝐭𝐢𝐜𝐬 & 𝐥𝐨𝐠𝐠𝐢𝐧𝐠 (𝐝𝐨𝐧’𝐭 𝐣𝐮𝐬𝐭 𝐥𝐨𝐠 𝐞𝐯𝐞𝐫𝐲𝐭𝐡𝐢𝐧𝐠 𝐥𝐢𝐤𝐞 𝐢𝐭’𝐬 𝐟𝐫𝐞𝐞 𝐬𝐭𝐨𝐫𝐚𝐠𝐞)
• We created custom analytic events to breakdown user journey and pushed them to the server — because that’s where we could see aggregate patterns across millions of devices. You just can’t get that scale from local logs.
• But not everything needs to hit the server. For debugging and fine-tuning, we also used local timestamp events to track certain transitions.
• This balance helped us avoid polluting backend logs with noise, while still having high-granularity visibility when we needed it.
⚙️ 𝐌𝐨𝐫𝐞 𝐍𝐨𝐭𝐞𝐬:-
Make API calls async, and always check for network race conditions.
Cache with proper invalidation. Don't rely on device state like time. Feature flag also helps.
Use tools like macrobenchmark to run startup flows multiple times on different devices — and profile each section to find hotspots.
🎯 𝐋𝐚𝐬𝐭 𝐛𝐮𝐭 𝐧𝐨𝐭 𝐥𝐞𝐚𝐬𝐭:• Don’t rush into fixing things blindly. If you're working on a large-scale app where stakes are high, take time to step back, experiment, and verify.• Always document your learnings and share with team.
on the client side, 'Large Scale' always just means 'Large Enigmatic Codebase'.
In that case, logging and measurement are your friends. Its about finding the few small achievable changes that fix %80 of the problems and let you keep going another year without needing a rewrite
This is great, do you have an article or blog or youtube or anything? I'm curious of more detailed explanation
Once a very wise person said to me that premature optimisation is root of all evil.
Unless you are a multi million dollar company, most of these will not be a concern initially.
When you are multi million dollar company, you will have enough resources to tackle such issues.
When you are multi million dollar company, you will have enough resources to tackle such issues.
Nope, unless tech is actually regarded as a monetary asset by the said business. Until then, all businesses regard tech as a necessary monetary liability. And so, it's always duct-tape patch fixing, so long it works.
therefore, if you are not optimally optimized right from the start, it's just going to be a Ripley's museum standing on a terrible foundation.
This is bad advice. Even in small to medium sized businesses requirement changes are bound to happen very frequently and having a code base that can tackle rapid changes as gracefully as possible goes a long way.
Optimization is a broad term in itself and depending on the scenario optimizing for rapid changes is usually very rewarding. On the other spectrum optimizing for performance can lead to over fitting vaguely as in neural networks, which is bad as well.
Optimization
CS majors thinks this means running through some exotic algorithm choice.
CS devs think this is done with SIMD instructions.
Web devs think this is done by pretending that 2 seconds to react to a click is normal.
Embedded devs will not use C++ because it's "bloated".
Meanwhile, the practical engineer is out there chosing architectures and not digging himself into a performance hole because "optimization bad". He's also not SIMD' instructions on a first pass nor using Bogosort.
premature optimisation is root of all evil.
Said the hardware vendor.
Ask ChatGPT
I did, posted here to see the experienced developers response
Scalability in itself is a very broad topic. What kind of scalability are we discussing here, for a mobile app ? How many users ? Well, as far as I can recall, only 1 user is using the app on their "mobile device". There's no multi-threading, thread-locking, multi-user interlocking problems in the app code at run-time, unless explicitly done poorly and introduced freshly.
Are we talking multiple users using the app at once, like live-streaming, or e-commerce purchasing on a Thanksgiving sales weekend or so ? Then, that's a server-side problem, really !! What can a mobile app do to resolve server-side multi-millions of users sending in http-request packets related scalability problems ? Oh well, ask the Backend ultra-superior Gods !!
Are we discussing feature-enhancements ? That's a business specific problem. Are we discussing code-base scalability to support a larger team ? Is the team expected to grow multi-fold, from 5 engineers to 20 engineers within a set time-frame ? That's an infrastructure problem, handling mono-repo, or modular custom / enterprise maven-repos, CI/CD, local and cloud gradle build configurations.
There's no one solution that fits all, except, probably there is - SOLID, DRY and KISS !!!
Similarly, security and performance are also very broad topics. Code-base repo security ? Network handshake security, avoid man-in-the-middle attacks ? Prod security, avoiding malicious users access to the apk package-file, injecting malware and stuff ? Or, perhaps, avoiding plagiarism, copying the logic and all ?
As you may notice, there's no one solution that fits all, in terms of any mobile app security. As far as Performance goes - again, SOLID, DRY and KISS !!
Thanks for reading through this sub-reddit talk !!!
There's no multi-threading, thread-locking
Yes there are, lol. Extremely important to handle concurrency and multi-threading correctly in an app. And for many apps it can be a bit complicated.
Here we go again !!
Can you build a standalone app that does not need to connect to the internet ? A sudoku game ? A hangman game ? A note-taking app ? yes, you may.
Do you need multi-threading in a standalone app ? I guess not. You need multi-threading for blocking operations. Non-blocking operations all execute on the main thread-group.
There's never multi-thread inter-locking within the main thread-group. PERIOD !!!
This is such a general, broad question that it isn't possible to give a useful answer.
The time targets slide is so extremely off base that I really wonder how OP arrived at this.
Pretty much every single number on the slide is an order of magnitude too high. I have worked on some of the largest apps around (huge kitchen sink FAANG apps with boatloads of frameworks and statically linked deps) and none of these numbers are anywhere close to realistic.
There is no universe where any iOS app has a dyld stage timing of 5000ms. 8000ms for initial UI rendering? GTFO.
Apple recommends <200ms launch time
The only direct quote I found from Apple mentions 400ms as launch time: https://developer.apple.com/videos/play/wwdc2019/423/?time=305
Guess we’re speedrunning apps now.
Talking about performance, any thoughts on using firebase performance or similar tools to track improvements across versions instead of Instruments?
Why do you say that having extra info.plist entries will increase app launch time? What’s your source?
The numbers are off by an order of magnitude. I wonder who upvotes this?
When Reddit’s team discovered their app took 12 seconds to launch for p90 (90%!) users, they were shocked. With over 2 million DAUs on the Android app, that meant about 200,000 users were waiting for >12 seconds for the app to load.
Reddit's engineering team made game-changing improvements to their Android app, reducing cold start times by over 8 seconds from app launch to the Reddit feed.
Here’s how they did it:
Thanks to these smart optimizations, Reddit’s cold start times have been consistently stable worldwide.
How do you all currently measure and optimise startup times? Have you seen if they're worse on some devices vs others, or some countries vs others?
12.3 seconds? No wonder people use (or used to use...) third-party apps! These days I use the Old Reddit website, but if they've made the app less insufferable I might give it another go.
As for my own testing, I just make sure my app runs well on a variety of devices. The only flagship I have is the Galaxy S5, so I don't find it difficult to avoid falling into the trap of only testing on fast devices.
I'm just going to say it: my initial reaction on reading this was...
"Who the f'k is in charge of an app that they 'discover' has terrible startup times only after hundreds of thousands of users are actively using it?"
In terms of "we solved a technical problem" -- Yay! Congratulations!
In terms of "this is a good example of successful app development project/process" -- Oh hell no.
Reddit as a web product had already achieved millions of active users. They scrapped together a mobile dev team and made Reddit's mobile app, and realised their code was unoptimised as hell and worked backwards towards fixing the launch times.
But definitely, an app at the scale of Reddit should never have had such a terrible performance. Proactive performance measuring could have them catch it much earlier.
Was that before or after they essentially killed third parties from building their own apps? 😉
Yep, that's my point. Whoever (a) let it get to an beta test stage, then (b) green-lit for release...
Not to mention the question of what kind of developer culture exists such that the devs either were not screaming about this or were ignored.
If you work at company with hard problems, you work longer on solutions. You don't get a free pass for releasing junk just because the problem the company chose to take on is hard. That goes for devs and managers, but the managers are ultimately responsible.
You'd be surprised how many large companies allow poor startup times, but 12s is a LOT
Ha ha! Yah… Worst thing about being a software developer is using software and knowing with a high degree of confidence that what you’re looking at doesn’t need to work this way… That a budget and a line in a spreadsheet and a middle manager somewhere made call that could have gone the other way.
And agree, 12 seconds is ridiculous. If one pauses and counts it off mentally with eyes closed, makes the reality of how long it is in that context really sink in.
>The Reddit Android app is terrible
This is why their app is a 0 second load time for me.
People in this thread have no idea what p90 means. p90 means that for 90% of users, the initial load time takes at most 12 seconds to launch. In other words, if you take a random initial load time, there's a 90% chance that its under 12 seconds. That doesn't mean that 90% of users are experiencing 12 second load times.
Are 10% of users accessing the website from underground? Because that 10% chance that it's taking over 12 seconds to load some text and thumbnails is still a really bad look for a website that's almost 20 years old
No. And I believe it's a notation used in statistics. But OP didn't clarify so he did that.
Read the original post from Reddit's Engg team here:
https://www.reddit.com/r/RedditEng/comments/1fij5wt/snappy_not_crappy_an_android_health_performance/
I decided to summarise their startup time findings as it helps me learn information and might help you all as well. It was interesting to see how bad their startup times were in the beginning.
Is it normal that the app performance of this game is hot garbage or is that just my phone?? Navigating menus is absolutely painful
It’s the game not your phone, it was fine but it’s usual they always mess up something with the updates.
How often do they update this app? Sorry to bother you, not a regular player.
A few months, 4-5
I remember during launch day dat it took 10secs just to enter roster. The GODDAMN roster.
Nowadays, still the same.
It's painful. Genuinely putting me off keep playing.
It's the game, everytime they do an update something goes wrong.
w00t??
> Use useRef Instead of Inline Functions in Loops
Simple :
Thank you 😊
And how will you support your app? Email? Phone? Text? Discord? How do you feel about having paying customers who will complain about your bugs (because there is no such thing as a flawless app. Everything has bugs.) What will you do when your app is rejected by App Review? Bottom line, please don’t. If your idea is good, build a company and hire people to code the app (in Swift of course) and you work on the design and features.
All good questions for consideration. Thank you…but why do you think it would get rejected by App Review? 🤔
Try sending them a drawing picture of the app
If you have a MacBook. Use Xcode editor and try swift Ui or sprit kit. Towards the end of the month Apple is coming out with some new stuff that will make it easier. More visual building for non coders. Also use good prompts and a good coding ai like chat gbt 5 thinking model. It will help you get everything set up and can even help make the code.
Amazing! Thank you so much 👌🙏🏼. I do have a MacBook. You’re right, good prompts are so crucial.
Learn from Ai tools and you can do anything from that…. You just need faith Btw you can use cursor.ai for coding without knowing coding
Thank you for the confirmation! I did read about cursor.
best practices for mobile app performance
Key Considerations for Mobile App Performance
Optimize Load Times:
Efficient Resource Management:
Reduce Network Requests:
Code Optimization:
Testing and Monitoring:
Battery and Memory Usage:
Recommendations:
By following these best practices, you can significantly enhance the performance of your mobile app, leading to a better user experience and higher retention rates.
Get more comprehensive results summarized by our most cutting edge AI model. Plus deep Youtube search.