Mosmoxmosmox

Mosmox journal

In focus — performance.

A selection of publications grouped under the performance tag.

Mobile Apps on Slow Internet: Practical Design Principles

Mobile Apps on Slow Internet: Practical Design Principles

Fast connectivity is not a permanent property of a user. People move between 5G, 4G, café Wi‑Fi and a no-signal zone in a lift, and the app should remain understandable in each of these states. In Ukraine, networks also become congested during power outages, when even "four bars" can mean seconds of latency.

In our projects we design network behaviour as deliberately as the interface: we decide what users will see within half a second, three seconds and ten seconds, and what happens if a request never completes. Below are the principles, concrete settings and test scenarios that help an app stay useful on a weak connection.

Why average speed guarantees nothing

According to the Ericsson Mobility Report, mobile traffic and data use per smartphone keep growing; we looked at these figures in our articles on mobile traffic in 2025 and 5G and mobile apps. But network averages do not guarantee the same quality for every session. What matters for user experience is not megabits but latency, packet loss and network transitions.

A request that takes 150 ms on office Wi-Fi can take several seconds on a congested network and break off midway at the edge of coverage. If a screen waits for five sequential requests, every delay is multiplied. So optimising for slow networks is first about reducing the number and sequencing of requests, not only their size.

Core principles

  1. Show a useful shell before every request finishes. Headers, navigation, saved data and skeletons instead of an empty screen.
  2. Deliver critical data first. An order status matters more than recommendations, so it should not wait for a heavy catalogue request.
  3. Allow retrying a failed action without losing input. A form, comment or photo must survive a dropped connection.
  4. Explain what is happening without blocking the whole screen unnecessarily. A local indicator next to an element beats a modal spinner.
  5. Keep the last reliable state available for reading. People should at least see previous data with a timestamp.

Technical decisions with the biggest effect

ProblemSolutionEffect on a weak network
Many sequential requests per screenAn aggregated endpoint or parallel requestsFewer latency round trips
Large responsesPagination, field selection, gzip or Brotli compressionFaster delivery of the first chunk of data
Heavy imagesScreen-sized images, modern formats, placeholdersText and actions available before media loads
Repeated downloadsHTTP cache, ETag, local databaseA 304 response or data without the network
Drops during submissionA queue, retries with exponential backoff, idempotency keysThe action completes without duplicates

Timeouts deserve special attention. By default OkHttp uses 10 seconds for connect, read and write, while URLSession on iOS uses 60 seconds per request. These values rarely fit the scenario: search with suggestions needs a shorter timeout and cancellation of stale requests, while photo upload needs a longer one with the ability to resume. On iOS, waitsForConnectivity lets a session wait for the network instead of failing immediately.

Two more techniques we use often. The first is prioritisation: requests that the visible part of the screen depends on start first, while analytics, prefetching of next pages and syncing secondary data wait. The second is retrying with exponential backoff and random jitter: if thousands of clients lose the network at once, without jitter they come back in a wave and overload the server exactly when it is recovering. Heavy content such as video or offline maps should be prefetched only over Wi-Fi or with the user's explicit consent.

Network state as part of the UI model

The same screen can show fresh data, a local cache, partially loaded content or a sync queue, and each state needs a clear label and action. If a screen's state model only contains "loading", "data" and "error", the team will inevitably end up with empty screens where saved data could have been shown.

We build at least these states into the model: data from the network, cached data with an update time, a background refresh over existing data, an error over existing data and no data at all. We wrote about working with saved data in our article on offline mode.

How to test slow networks

Test real packet loss, latency and network transitions rather than only "fast" and "slow" settings. On iOS there is Network Link Conditioner; on Android, the emulator's network settings or a proxy such as Charles or Proxyman with bandwidth throttling. We use several profiles of our own:

  • Slow but stable: about 400 ms latency and 400 Kbps.
  • Unstable: the same speed plus 3–5% packet loss.
  • Drop midway: cutting the network while submitting a form or uploading a file.
  • Switching: moving from Wi-Fi to mobile data during an active action.
  • Captive portal: Wi-Fi is connected, but the internet is unavailable until network sign-in.

These values are our working guidelines, not an industry standard. What matters is that the team checks key journeys with the same profiles before every release.

Common mistakes

  • A full-screen spinner until every request on the screen completes.
  • Clearing a form after a network error.
  • Default timeouts with no analysis of the scenario.
  • Retries without delay that further overload the network and server.
  • Loading full-resolution images for thumbnails.
  • Testing only on office Wi-Fi.

Action plan

  • For key screens, define what users see at 0.5, 3 and 10 seconds.
  • Reduce the number of sequential requests on critical screens.
  • Review timeouts and retry policies for each request type.
  • Add cache, background-refresh and error-over-data states to the UI model.
  • Set up slow-network profiles and include them in regression testing.
  • Track request duration in analytics by percentile and network type.

A product that works well on slow internet usually feels faster on a good network too. It does not make users wait where they could already begin.

Sources: Ericsson Mobility Report: Mobile traffic forecast; OkHttp documentation; Apple: URLSessionConfiguration; Android Developers: Connect to the network.

Why Unnecessary Third-Party Libraries Slow Down a Mobile Product

Why Unnecessary Third-Party Libraries Slow Down a Mobile Product

A third-party library can save weeks of development, but every dependency adds code, initialisation, permissions, updates and compatibility risk. The problem does not start when the SDK is added; it starts a year later, when the team no longer remembers why it was added, who owns it, or whether it is used at all.

In projects we take over from other teams, a dependency audit almost always uncovers several SDKs that duplicate each other, or libraries reduced to a single call. Below we look at how dependencies affect speed and stability, what the public Zomato and Josh case studies show, and how to run an audit that produces a measurable result.

How dependencies affect the experience

An SDK may start before the first screen, make network requests, increase package size or compete for CPU at the most sensitive moment of a session. Even a feature users will see a few minutes later, or never, can slow down the start of every launch.

On Android, many libraries initialise automatically through a ContentProvider, before Application.onCreate is even called. Developers may not realise someone else's code is already running. On iOS, dynamic frameworks have a similar effect: each extra framework adds work for the loader before the first frame.

  • Startup: synchronous initialisation, reading configuration from disk, network calls.
  • Size: the SDK's own code plus its transitive dependencies.
  • Stability: crashes inside third-party code, version conflicts, incompatibility with a new OS.
  • Privacy and security: data collection the team is unaware of, vulnerabilities in outdated versions.
  • Store review: App Store and Google Play data disclosure requirements also apply to third-party SDKs.

What the Zomato and Josh cases show

In the Zomato case study on Android Developers, the team used Perfetto to trace every SDK initialised during startup and identify which could be removed or loaded lazily. Removing legacy SDKs and unused third-party libraries was the top priority because it was low effort and high gain.

Action in the Zomato caseBefore, sAfter, sImprovement
Removed legacy SDKs and unused libraries4.8733.81321.74%
Lazy loading of libraries3.8143.5776.2%
Layout improvements and ViewStubs2.5292.3487.15%

The Facebook login SDK is a telling example. Zomato users had other sign-in options, so initialising it on every start was wasteful. After moving to the App Startup library, the SDK loads only when someone chooses Facebook login, which cut startup time by about 6%.

In its case study, the Josh team also investigated the impact of third-party SDKs on startup, disabled auto-start for some of them and removed legacy libraries. Both examples confirm the same approach: remove obvious overhead first, then tackle more complex optimisations.

A practical dependency audit

  1. Build a complete register. Print the dependency tree (the Gradle dependencies task on Android, Package.resolved or Podfile.lock on iOS) and record direct and transitive libraries.
  2. Assign an owner to each SDK. A person or team responsible for updates, configuration and the decision to remove it.
  3. Write down the business reason. What problem the dependency solves and how you will know it is no longer needed.
  4. Check actual usage. Searching for calls often shows that a single utility is all that is used from a large library.
  5. Measure its contribution. Size in the package, initialisation time in the startup trace, network requests, share of crashes in Crashlytics or a similar tool.
  6. Make a decision. Keep it, initialise it lazily, replace it with a lighter alternative or remove it.
  7. Lock in a policy. A new dependency is added only with a short description in the pull request: why, how heavy, who owns it.

When to write your own and when to keep a library

Not every library should be replaced with custom code. Cryptography, payments, the networking stack or image loading are better left to proven, actively maintained solutions: a home-grown replacement is often more expensive and less reliable. The decision should weigh security, support, licence and the cost of the alternative.

On the other hand, wrappers around one or two platform functions, outdated utilities long covered by the Kotlin or Swift standard library, and duplicate analytics SDKs are the first candidates for removal. An unowned dependency with no measurable value quickly becomes technical debt.

Before adding a new library, we ask a few simple questions: when was the last release, how many open issues report crashes, does it support current iOS and Android versions, what is its licence, and can we drop it without rewriting half the app? If two or three of these have no confident answer, it is better to isolate the SDK behind your own interface so that a future replacement touches a single module.

Take store requirements into account too. Apple requires a privacy manifest and signature for commonly used third-party SDKs on its list, and Google Play asks you to disclose in Data safety the data collected by third-party libraries. The fewer SDKs you have, the easier it is to meet these requirements.

Common mistakes

  • Adding an SDK "for the future". The library was added for a feature that never shipped, but its initialisation stayed.
  • Several tools for one job. Two or three analytics SDKs at once, each with its own initialisation and network traffic.
  • Updating only under pressure. The team updates dependencies only when a new OS version breaks the build.
  • Blind trust in auto-initialisation. Nobody checked what the SDK actually does at startup.
  • Removing without measuring. Without a before-and-after trace, it is unclear whether the change had any effect.

We wrote more about the impact of dependencies on package size in how to reduce mobile app size, and a full breakdown of Zomato's startup work is in our piece on speed and user retention.

Team checklist

  • There is an up-to-date register of all SDKs with an owner and a business reason.
  • You know which SDKs initialise before the first frame, and each one has a justification.
  • Non-critical libraries initialise lazily or after the first screen.
  • Duplicate tools have been removed, leaving one per job.
  • Dependencies are updated on a schedule, not only during emergencies.
  • A new dependency is added via a pull request describing its weight, reason and owner.
  • The privacy manifest and Data safety form match the actual set of SDKs.

Sources: Android Developers: Zomato app speed case study; Android Developers: Josh startup performance case study; Android Developers: App Startup; Apple: Third-party SDK requirements.

How to Reduce Mobile App Size Without Losing Functionality

How to Reduce Mobile App Size Without Losing Functionality

App size affects the decision to install, download time and how much storage a product takes on the device. It matters especially in markets with expensive mobile data and on phones with 32–64 GB of storage, where people regularly delete apps to make room for photos and system updates.

The good news is that most "extra" megabytes have nothing to do with functionality. They are forgotten resources, unoptimised images, duplicate libraries and code nobody calls. Below is how we at the studio approach size reduction: what to measure, where to look for weight, which tools give the biggest effect, and what you should not cut even for a nicer number.

Why size matters for the business

In 2017 the Google Play team published an analysis of its own data: for apps under 100 MB, every additional 6 MB of APK size correlated with roughly a 1% drop in install conversion. In emerging markets, removing 10 MB correlated with about a 2.5% increase in conversion. This is a correlation, not a controlled experiment, and some teams report a much smaller effect, but the direction is clear: a large package is friction at the door.

Size does not only affect the first install. Large updates are more often postponed when the phone is not on Wi-Fi, and a heavy app is the first candidate for deletion when the system warns about low storage. In our projects we treat size as part of the experience, alongside startup speed.

Where the extra weight comes from

  • unused resources and duplicate icons and illustrations in several densities;
  • large images and video without adaptive variants or modern formats;
  • third-party SDKs that add unused features;
  • debug code, logging and symbols in production builds;
  • dependencies that transitively pull in unnecessary modules;
  • bundled fonts with full glyph sets for languages the product does not support;
  • native libraries for every architecture in a single package.

Analyse first, optimise second

Start with a build analysis rather than assumptions. On Android that means APK Analyzer in Android Studio, the size report in Play Console and comparing two builds side by side. On iOS, use the App Thinning Size Report in Xcode and the per-device file size report in App Store Connect. Look at download size and install size separately: the compressed package and what occupies disk space can differ several times over.

Source of weightHow to find itWhat usually helps
Code (DEX, binary)APK Analyzer, Link Map in XcodeR8 with shrinking and optimisation, dead code removal, SDK audit
Raster imagesSort resources by sizeWebP or AVIF, vector graphics for icons, Asset Catalog
Unused resourcesLint, shrinkResourcesAutomatic removal at build time, cleaning up obsolete screens
Native librariesContents of the lib folderAndroid App Bundle, which delivers only the required architecture
Large contentVideo, models, dictionaries in the packagePlay Asset Delivery, On-Demand Resources or Background Assets on iOS

According to the WebP documentation, lossy compression produces files 25–34% smaller than comparable JPEGs, and lossless compression about 26% smaller than PNG. In illustration-heavy projects, images are often the fastest win.

A step-by-step size reduction plan

  1. Capture a baseline. Record download and install size for a typical device on each platform and keep the report in the repository.
  2. Find the ten largest components. A handful of items usually account for most of the weight, so start there.
  3. Turn on platform tooling. On Android, R8 with minifyEnabled and shrinkResources, and publishing as an App Bundle. On iOS, Asset Catalogs and no unnecessary architectures or symbols in the final binary.
  4. Review media. Convert raster assets to modern formats, replace simple icons with vectors and remove duplicates.
  5. Audit dependencies. For every SDK, check whether the whole module is used and whether a lighter alternative exists.
  6. Move rare scenarios out. Features used by a small share of the audience can be delivered as a separate module via Play Feature Delivery, or their content can be downloaded after installation.
  7. Add a budget to CI. A build that grows beyond an agreed threshold, for example 500 KB in a single pull request, should require explicit approval.

What not to cut

Do not remove analytics, security or error handling just to improve a number. Decide what must be available immediately and what can load later. Users care about a fast, useful start, not the smallest possible first package.

Be equally careful with aggressive obfuscation and removing code that is called via reflection: incorrect R8 rules produce crashes that only appear in release builds. That is why we verify every optimisation with tests and on real devices.

Note a newer Google requirement as well: Android vitals now tracks DEX code optimisation. Apps with more than 10 MB of DEX code are expected to apply optimisation, obfuscation and shrinking, and failing the thresholds may affect visibility on Google Play starting in February 2027.

Common mistakes

  • Optimising without measuring. The team spends a week rewriting a module and saves a few hundred kilobytes.
  • Comparing different metrics. APK size on a developer's disk is not what the user downloads through an App Bundle.
  • Moving everything to "download later". If a core feature needs an extra download after first launch, the user sees a spinner instead of value.
  • A smaller file but a slower start. If unpacking or initialisation became heavier, the overall experience got worse.
  • A one-off clean-up. Without a budget, size creeps back within a few releases.

Check results on real devices, especially budget ones; we wrote about this in detail in our article on testing on inexpensive phones. Our breakdown of Baseline Profiles in Android Calendar shows how code optimisation and startup are connected.

A one-sprint action plan

  • Produce download and install size reports for iOS and Android.
  • List the ten largest components and an owner for each.
  • Enable R8, shrinkResources and App Bundle publishing if they are not already on.
  • Convert the largest raster assets and remove duplicates.
  • Remove or replace SDKs that deliver no measurable value.
  • Add a size check to CI with a per-pull-request threshold.
  • After release, compare install conversion, first-launch time, crash rate and uninstalls.

Sources: Google Play: Shrinking APKs, growing installs; Android Developers: Reduce your app size; Android Developers: Android vitals; Google: WebP; Apple: Reducing your app’s size.

Josh: How Faster Startup Helped Retain Users on Older Devices

Josh: How Faster Startup Helped Retain Users on Older Devices

A video app can lose attention in seconds. If the feed takes too long to open or scrolling stutters, it is easier for users to close the app and move to another service. The problem is even sharper for audiences on older and low-end phones: every extra hundred milliseconds at startup is multiplied by a slow CPU, limited RAM and crowded storage.

The case study of Josh, an Indian short-video platform, published on Android Developers, shows how systematic startup work turns into a product result. Below we break down what the team actually did, which lessons are worth carrying into your own project, and how we at the studio organise this kind of optimisation, from the first trace to post-release monitoring.

What we know about the Josh case

Josh is a short-video app launched in August 2020. When the case study was published, it had more than 124 million monthly active users and around 60 million daily users. Its audience used a very wide range of devices, from flagships to inexpensive models, and video was the main format. Any stutter in the feed or pause in an interaction quickly made people lose interest.

The team monitored Android vitals and identified an opportunity to improve startup. They prioritised cold start, the heaviest scenario, when the app process does not exist yet. The reasoning is simple: speed up cold start and warm and hot starts usually improve as well.

According to the case study, average startup time improved by 30%, and the app became three times faster for roughly 10% of users on older and low-end phones. Better bounce rates and retention helped Josh retain more than 1 million users compared with the baseline, and Play Store ratings trended upward after the release.

What exactly changed in startup

The most valuable part of the case is not the percentages but the list of actions. The team used custom traces, Systrace, Perfetto, dumpsys and Android Studio Profiler, and found that most of the time was spent in Application.onCreate and other synchronous methods at startup.

  • They profiled every block of code executed during startup.
  • They investigated the impact of third-party SDKs and disabled auto-initialisation for some of them.
  • They removed legacy libraries.
  • They deferred some modules and moved them to background execution.
  • They reduced the size of splash screen drawables and optimised them for different screen sizes.

Each change was validated in isolation by emulating cold starts and using the Jetpack Macrobenchmark library. That detail matters: without isolated measurement you cannot tell which change produced the effect and which only added complexity.

Why the average hides the problem

Average startup time is a convenient number for a report, but it masks the worst experience. If 90% of the audience opens the app in one second and 10% in five, the average looks acceptable even though the product is effectively broken for one user in ten. That is why the Josh result of "three times faster for 10% of users" matters more than "30% on average": it shows the team worked on the tail of the distribution.

In our projects we see the same pattern: p90 and p95 percentiles split by device class almost always reveal problems that are invisible in the average. Android vitals defines the reference points directly.

Startup typeWhat happens"Slow" threshold in Android vitals
ColdThe process is created from scratch; Application and the first Activity are initialised5 s or more
WarmThe process exists, but the Activity is recreated2 s or more
HotThe Activity returns from the background1.5 s or more

These thresholds mark where the experience is considered bad; they are not a goal. For our own budgets we usually set much stricter p90 values on low-end devices and track time to the first rendered frame of the feed separately.

How to repeat the approach in your app

  1. Capture a baseline. Record cold, warm and hot start on three device classes: a flagship, a mid-range phone and a three- to four-year-old budget phone. Use Macrobenchmark with several iterations rather than a single manual launch.
  2. Take a system trace. In Perfetto, look at what happens between process creation and the first frame: SDK initialisation, dependency injection, disk reads, network calls on the main thread.
  3. Build an initialisation register. For every SDK and module, record whether it is needed before the first screen, who owns it and how many milliseconds it takes.
  4. Defer everything non-critical. Initialise analytics, ads and features that appear later lazily or on a background thread after the first frame.
  5. Lighten the first screen. Shrink splash graphics, simplify the layout and load only the first feed items rather than the whole feed.
  6. Measure every change separately. One pull request, one optimisation, one measurement. That way you know the real contribution of each step.
  7. Lock in the result. Add Macrobenchmark to CI with a startup budget that blocks a release when exceeded. Also consider Baseline Profiles, a tool that helps critical code run faster from the very first launch.

Typical mistakes that eat the gains

  • Testing only on the team's phones. Developers usually have new devices and simply do not see problems in the budget segment.
  • Measuring debug builds. A debug build behaves differently from a release build with R8 and optimisations; its numbers are misleading.
  • Moving work "to the background" without control. If deferred initialisation competes with the first frame for CPU, users still feel the slowdown.
  • Trading stability for decorative smoothness. Aggressive optimisations that raise crash or ANR rates cancel out the speed gain.
  • One-off optimisation. Without a budget in CI, new features push startup back to where it was within a few releases.

We covered how to choose a test device fleet in our article on testing on inexpensive devices, and startup metrics in the piece on app startup speed.

What performance work gives the product

The Josh case shows that startup optimisation is audience work, not only technical-debt work. When an app becomes usable on modest devices, the team returns access to people who would otherwise have left. For Josh this showed up in bounce rate, retention and ratings; a similar link between speed and business metrics is described in the Zomato case.

Another effect highlighted in the case is organisational. Working on vitals brought the team together, and the learnings were later applied to other apps in the company. When performance becomes a shared metric rather than the job of a single "performance engineer", it is much easier to sustain.

Checklist before your next release

  • There is a baseline for cold, warm and hot start on three device classes.
  • Startup metrics are reviewed at p50, p90 and p95, not only as an average.
  • Every SDK in the startup path has an owner and a reason it is needed before the first frame.
  • Non-critical initialisation is deferred and does not compete with rendering the first screen.
  • Splash and first-screen graphics are optimised for display size.
  • Macrobenchmark runs in CI, and exceeding the startup budget stops the release.
  • After release, the team watches Android vitals, crash rate, ANR and retention in the low-end device segment.

Sources: Android Developers: Josh startup performance case study; Android Developers: App startup time; Android Developers: Macrobenchmark; Android Developers: Baseline Profiles.

Gmail Wear OS: How the Team Improved App Startup by 50%

Gmail Wear OS: How the Team Improved App Startup by 50%

The small screen and limited resources of a wearable make every delay noticeable: a person raises their wrist for a few seconds, and if the app hasn't shown the mail by then, the moment is gone. The Gmail Wear OS case study published on Android Developers shows how a methodical startup analysis helps uncover non-obvious causes of a slow first screen.

The case is valuable less for its result than for the transparency of its method: the team shows step by step where to look in a trace and how to interpret what you see. We use the same analysis sequence in our own Android projects, so below is a breakdown of the case with practical commentary.

Context: why a watch is a tough test

The Gmail Wear OS team had its own performance criteria for startup and rendering and worked to meet them. An important detail the case highlights: the device had only two CPU cores. On such hardware, any parallel work — animation, background initialisation, system processes — competes with the main thread far more noticeably than on a modern eight-core phone.

The authors note that even if you have no formal thresholds, there's almost always room to improve startup if you take time to investigate. For a first assessment, you can compare your app against a peer group in Play Console and simply trust your instincts: if startup feels slow, it is.

How they found the problem: five points in the trace

The team recorded a system trace and analysed it in Perfetto, because it shows what's happening across the whole device, not just in your process. Here's what they looked at and what it means.

What to look at in the traceWhat it signalsWhat to do
The Android App Startups rowstartup boundaries up to the first frame (TTID)pin it to the top and analyse everything in that interval
Runnable vs Running ratio on the main threadthe thread is ready to work but doesn't get the CPU — contentionlook for intensive parallel work, especially animations
OpenDexFilesFromOat*time spent reading the app's DEX filesreduce code size with R8 minification
Binder transactionssystem service calls that may block startupdefer non-essential calls until after startup
Jit thread poolcode is compiled on the fly instead of ahead of timeextend the Baseline Profile to the point the screen is ready

Main thread and CPU contention

After selecting the startup interval on the main thread, the team examined the Thread States panel. The more time the thread spends in Runnable relative to Running, the more likely there's CPU contention: the thread is ready to run, but the scheduler gives the core to something else. The visible app has the highest priority, so an idle main thread often means it's being "interrupted" by intensive work inside the app itself — for example, animation rendering.

Binder transactions

The first binder transaction turned out to be long. Following the reply to the system process, the team saw a Runnable (Preempted) state and display controller events with higher priority. The conclusion: this was important system work — putting frames on the screen — and they left it as is. We consider this one of the most useful episodes in the case: not every finding in a trace needs fixing, and knowing when to stop saves days of work.

JIT activity

The app already had a Baseline Profile, so JIT barely ran before the first frame. But right after it, noticeable background compilation appeared. The fix was to extend profile collection: in the Macrobenchmark generation test, wait for a specific element that indicates the screen is fully populated.

What worked

  • A static state instead of a spinner. Having noticed CPU contention, the team replaced the animated loading indicator with a single static image.
  • Deferred shimmer. The splash screen was prolonged to defer shimmer — the second loading state — and free up CPU resources.
  • R8 rewriting of Baseline Profiles. Based on the OpenDexFilesFromOat* and JIT analysis, the team enabled profile rewriting via R8, which requires AGP 8.2 or newer.
  • A process, not a one-off. The team recommends setting up automated collection of traces and results through benchmarking.

As a result, the first group of changes — the static image and deferred shimmer — improved startup latency by 50%, and R8 rewriting by another 20%. These aren't universal percentages for every product, but they're a good example of engineering discipline: measure, find the bottleneck, change one cause and measure again. We examined how animation in general affects speed and perception in our article on animation in mobile interfaces.

How to repeat the analysis in your project

  1. Build a release-like variant: a debug build disables ART optimisations and the trace won't be representative.
  2. Record a cold-start trace on the weakest target device — via on-device system tracing or Macrobenchmark.
  3. Open the trace in Perfetto, pin Android App Startups and the two main-thread rows.
  4. Assess Runnable/Running. If Runnable is significant, look for animations and parallel tasks in that interval.
  5. Check OpenDexFilesFromOat*, binder transactions and the Jit thread pool using the table above.
  6. Form one hypothesis, make one change, re-measure on the same device.
  7. Validate the result with an A/B test or controlled release, and reject the change if it had no effect.

Typical mistakes in this kind of analysis

  • Adding loading indicators when you don't know what to optimise: they mask the problem and consume resources themselves.
  • Fixing everything that looks suspicious instead of starting with the longest frame.
  • Ignoring hardware context: on a two-core device, high Runnable time is partly expected.
  • Ending Baseline Profile collection at the first frame.
  • Judging impact on a single launch instead of a series of measurements.

Checklist

  1. There's a reproducible way to record a cold-start trace.
  2. Five points are checked: startup boundaries, Runnable/Running, DEX, binder, JIT.
  3. Startup animations are replaced with static states where they compete with the first screen.
  4. The Baseline Profile covers the journey until the screen is fully ready; R8 rewriting is enabled.
  5. Every change is validated by re-measurement and an A/B test.
  6. Trace collection is automated in CI.

Teams often add loading indicators when they don't know what to optimise. This case is a reminder that sometimes the best animation is the one you don't have to run. We described the broader framework of startup metrics in our article on app startup speed, and the role of Baseline Profiles in another example in our breakdown of the Android Calendar case.

Sources: Android Developers: How Gmail Wear OS improved app startup; Android Developers: App startup time; Android Developers: Baseline Profiles overview; Perfetto documentation.

Android Calendar and Baseline Profiles: How Startup Optimization Reduces Jank

Android Calendar and Baseline Profiles: How Startup Optimization Reduces Jank

Mobile app optimisation often starts with a feeling that "it's slow", but it should end with a measurable result. Baseline Profiles give a team a way to describe the most important code paths in advance and reduce the work a device does during the first launches and in key journeys.

The Android Calendar case study published on Android Developers is one of the best-documented examples: it has the motivation, the specific journeys, the measurement method and before-and-after numbers. We break it down in detail and add what we see when introducing profiles in our own Android projects.

How Baseline Profiles work

When an Android app launches for the first time after installation, a large share of its code runs in the interpreter or is compiled on the fly by the JIT compiler. That costs CPU time exactly when the user is waiting for the first screen. A Baseline Profile is a list of classes and methods worth compiling in advance. The profile ships with the build, and at install time the system compiles that code ahead of time.

According to Android documentation, Baseline Profiles speed up code execution by about 30% from the first launch, because they skip interpretation and JIT for key journeys. Profiles help not only startup but also smoothness: scrolling, screen transitions, opening complex lists.

There's another mechanism — Cloud Profiles, which Google Play builds automatically from real-world app usage. The Calendar team already had Cloud Profiles, so it's important to understand the difference.

ParameterCloud ProfilesBaseline Profiles
Setupenabled by defaultconfigured by the team
Which journeys are includedchosen automatically from user datachosen by the team
Work best for a user base that islargeany size
When the impact appearsa few days after releaseimmediately
Android versionsAndroid 9 (API 28) and higherAndroid 7 (API 24) and higher

Why the Calendar team needed its own profiles

The main reason was the move to a weekly release cycle. Cloud Profiles reach peak impact only 1–2 days after a version ships, because they rely on aggregated user data. With a weekly cycle, that means people spend a large share of the time on an unoptimised build. Baseline Profiles take effect from the first minute after the update is installed.

The second reason was control. The team wanted to choose the critical user journeys (CUJs) included in the profile themselves. There were two:

  • Opening the app in schedule view — the default view, so it matters for new users and those who don't change settings.
  • Opening the app in month view — according to analytics, many users choose it.

Profiles were generated through an internal wrapper around Jetpack Macrobenchmark: the test launches the app, waits for recurring events and tasks to appear on screen, opens the side drawer and verifies the selected view. Note the detail: the test waits for real content, not just the first frame.

How they measured the result without an A/B test

Baseline Profiles are tightly bound to the APK and are applied before the code runs, so a classic A/B experiment within one version is impossible. The team used controlled releases: only a subset of users received the new version, and its metrics were compared with a group on a version as close as possible to the previous one. Results were aggregated across a wide range of devices:

  • median interactive startup — the most common scenario — dropped from 775 to 644 ms (17%);
  • median cold start — from 1,058 to 901 ms (15%);
  • median warm start — from 453 to 378 ms (17%);
  • the median janky frame rate in schedule and month views decreased by 42–60%.

Overall, the team reports roughly a 20% startup improvement and about a 50% reduction in slow or frozen frames. Even users who open other views benefited: shared processes, such as loading calendar data from the database, were also covered by the profile. The documentation adds a caveat: if Cloud Profiles run in parallel, the difference shrinks slightly during the first week as cloud profiles "catch up".

How to introduce Baseline Profiles: step by step

  1. Pick 2–4 critical journeys. Cold start to the main screen, the most popular transition, the main scrolling list. Use analytics data, not assumptions.
  2. Add the Baseline Profile Gradle plugin and create a module for profile generation. Android Studio has a ready-made template.
  3. Write the generator with BaselineProfileRule. Take the journey to the point where the screen is genuinely populated: wait for a specific UI element. For startup, enable includeInStartupProfile to also get DEX layout optimisation.
  4. Generate the profile on an emulator or physical device and commit the result to the repository.
  5. Measure the effect with Macrobenchmark: compare CompilationMode.None with CompilationMode.Partial using the profile, with StartupTimingMetric and FrameTimingMetric.
  6. Enable R8. R8 rewriting of profiles requires AGP 8.2 or newer; in the Gmail Wear OS case study, that alone added another 20% to startup speed.
  7. Automate regeneration. A profile ages along with the code — regenerate it in CI before every release.
  8. Check field data in Android vitals after a controlled release.

What matters for other teams

  • Profile real key journeys, not a random set of screens.
  • Check results across device classes: the gain is usually largest on weak devices. We explained why this matters in our article on testing on inexpensive devices.
  • Compare controlled groups when an A/B test isn't possible.
  • Combine profiles with Macrobenchmark in the lab and field metrics in Play Console.

Typical mistakes

  • Expecting profiles to fix poor architecture. If Application.onCreate synchronously initialises a dozen SDKs, a profile will only speed up unnecessary work a little.
  • Generating a profile once and forgetting it: a few releases later it covers the wrong code.
  • Measuring on a debug build, where profiles and R8 don't behave as in release.
  • Ending the generation journey at the first frame, so data-loading code never makes it into the profile.
  • Not checking whether the profile actually gets installed: ProfileVerifier in the ProfileInstaller library exists for that.

Checklist

  1. 2–4 critical journeys are defined based on analytics.
  2. The profile generation module works and runs in CI.
  3. There's a Macrobenchmark for startup and smoothness comparing "no profile / with profile".
  4. R8 is enabled and AGP 8.2+ is used.
  5. The effect is confirmed by a controlled release and Android vitals data.
  6. Results are tied to product metrics: abandonment, rating, completion of the key action.

Baseline Profiles work best when the team already knows which path has to be fast. We laid out the general framework of startup metrics in our article on app startup speed. For the business, it's important to link the technical improvement to behaviour: faster startup can reduce abandonment and raise ratings, but that has to be verified with data, not assumed.

Sources: Android Developers: Android Calendar Baseline Profiles case study; Android Developers: Baseline Profiles overview; Android Developers: Benchmark Baseline Profiles with Macrobenchmark; Android Developers: Gmail Wear OS startup case study.

R8 Keep Rules and DEX Optimization: How Third-Party Libraries Block Google Play's Requirement

R8 Keep Rules and DEX Optimization: How Third-Party Libraries Block Google Play's Requirement

In February 2027 Google Play will start requiring a minimum level of code optimization from large apps and games. We are talking about DEX code: at least 25% optimization, obfuscation and shrinking for every upload to Play Console. It sounds like the app team's own business, but there is a catch: the result depends on more than your code. It is also affected by the keep rules that third-party libraries ship with themselves.

On 17 November 2026 the Android Developers team published a guide for library authors explaining how overly broad rules block optimization in apps. Here is what it means for your product and how to check your dependencies before the deadline.

What Google Play requires

According to the Google Play help page, the new requirement applies from February 2027 and covers all form factors:

  • a minimum of 25% optimization, obfuscation and shrinking for uploads to Play Console;
  • it applies only to apps with more than 10 MB of DEX code and games with more than 50 MB of DEX code; smaller projects are not required to optimize;
  • the numbers for each app bundle are visible in the app bundle explorer in Play Console (Release → Releases overview); builds from CI/CD may differ slightly from the uploaded one;
  • the tool is not prescribed: any shrinker or optimizer works, such as R8, and Google recommends the R8 Configuration Analyzer for tuning.

Google stresses that Play requirements are not optional: failing to meet one "can affect an app's visibility and publishing capabilities" on Google Play. The page does not list separate penalties for DEX optimization specifically.

Why dependencies can block the result

R8 removes unused code, optimizes the rest and obfuscates names. But it can only work within the limits set by keep rules. And you are not the only one writing them: libraries ship consumer keep rules embedded in the AAR or JAR so that R8 does not remove classes the library reaches through reflection or JNI.

The problem is that library authors often play it safe. To keep an SDK from crashing on a removed class, they add a rule for an entire package. A typical example from Google's guide:

-keep public class com.google.android.gms.** { *; }

A rule like this makes R8 keep everything in the package, even if the app uses only a tiny part of it. If you yourself restricted another GMS library to a narrow rule, the SDK's broad rule overrides yours. According to Google, the result is a bloated app, slower startup, more memory use, a bigger download and a higher ANR rate. And the numbers in Play Console reflect the combined impact of the rules from your code and from your libraries.

What Google advises library authors, and what you should check

PracticeThe ideaWhat to check in your project
Narrow rulesDescribe only what the library reaches through reflection; for dynamic access the entry point is enough, and R8 handles the restWhether your dependencies ship rules like com.vendor.**
Codegen instead of reflectionSerialization and dependency injection work better with code generation (Hilt is an example): R8 sees code usage at build timeWhich libraries still rely on reflection
Conditional keep rulesFor example for ad mediation adapters: keep a format only if the matching adapter is includedWhether you pull in ad adapters you do not need
Rules in the library, not in documentationConsumer rules have been supported in AARs and JARs for years; rules in documentation create manual work and leftovers of obsolete rulesWhether your proguard-rules.pro still contains "README recipes" that are no longer needed
JNI targetsSDKs with native code (games, photo and video editors) need rules for every class used through JNIIf you use Unity or Unreal, check the plugins

Google also advises against using keepnames just to get readable stack traces: Firebase Crashlytics, Play Console and Logcat in Android Studio deobfuscate traces from the mapping file on their own, so there is no need to disable obfuscation for that.

How to check your app in one day

  1. Open the numbers in Play Console. In the app bundle explorer look at the DEX size and optimization percentage of the uploaded bundle. If the DEX is under 10 MB (50 MB for a game), the requirement does not affect you.
  2. Run the R8 Configuration Analyzer. It shows optimization, shrinking and obfuscation percentages, and also inefficient keep rules: yours and the consumer rules from libraries.
  3. Find the broadest rules. Look for package patterns with ** and { *; }. The analyze command in Android CLI shows used and unused package-wide keep rules in an AAR or JAR.
  4. Test critical flows in a release build. After every rule change, go through sign-in, payment and the main flow: errors caused by removed classes only show up in an optimized build.
  5. Talk to the library authors. If an SDK ships broad rules, file an issue with the analyzer result. That is better than maintaining your own rules that override the library's: according to Google, such apps then become reluctant to update the library for fear of risk.

It is also worth watching SDK versions in the Google Play SDK Console and uploading the mapping file so you can see deobfuscated traces.

Why it matters for the product

For product teams this is more than technical hygiene. Google links DEX optimization to faster startup and lower memory use, and the Play requirement means optimization becomes a condition of publishing rather than a nice-to-have. If your Android app has not had its R8 configuration reviewed in a long time, schedule an audit before February 2027: it is better to find a blocker calmly than on release day.

Need an R8 configuration audit or help optimizing an Android app? Get in touch: we will look at your build and dependencies and propose a plan.

App Startup Speed: Which Milliseconds Users Actually Feel

App Startup Speed: Which Milliseconds Users Actually Feel

Users don't measure cold start with a stopwatch, but they feel the difference between a ready screen and a splash that seems stuck. Startup time is the first trust check: is it worth waiting for the product to get ready, or is it easier to close it and open a competitor?

In our projects, the conversation about startup speed almost always begins with "it's fast on my phone". So the first step is agreeing on what exactly we measure, on which devices and against which thresholds. Below are the metrics, targets, tools and optimisation sequence we use on Android and iOS.

Three startup moments that are easy to confuse

Measure the time from tapping the icon to three different events. These are fundamentally different moments:

  • First frame (TTID, time to initial display). The system has shown the first frame of the app's UI. Android records this metric automatically, and it's what Android vitals uses.
  • Ready to use (TTFD, time to full display). Primary content has loaded and the person can perform the action they came for. The system can't know this moment on its own: the app must report it via reportFullyDrawn() or, in Compose, via ReportDrawnWhen.
  • Fully loaded. Secondary blocks, images and recommendations have arrived. For the user, this moment usually matters least.

A screen that's drawn quickly but doesn't respond to touch is not a fast experience. So for the product, the key metric is TTFD; TTID is a technical indicator.

Also distinguish startup types. Cold — the process is created from scratch, for example after a phone reboot. Warm — the process is alive, but the activity is recreated. Hot — the app simply returns from the background. Optimise assuming a cold start: that improves the other two as well.

Thresholds and targets

What we measureThreshold or targetSource
Cold start, Android5 s or longer is excessiveAndroid vitals
Warm start, Android2 s or longer is excessiveAndroid vitals
Hot start, Android1.5 s or longer is excessiveAndroid vitals
First frame, iOStarget of about 400 msApple, WWDC 2019 "Optimizing App Launch"
Feels instantaneousabout 0.1 sNielsen Norman Group
Limit of uninterrupted attentionabout 1 sNielsen Norman Group

Vitals thresholds are not a goal but the floor of decency. From our experience, service and e-commerce apps should aim for a cold TTFD under 2 seconds on mid-range devices. That's a studio estimate, not a standard, and it should be calibrated against your own data and audience.

How to measure: tools

  • In the lab on Android: Jetpack Macrobenchmark with StartupTimingMetric gives stable TTID and TTFD on a real device. For deep analysis, a Perfetto trace with the Android App Startups row.
  • In the lab on iOS: the App Launch template in Instruments and XCTApplicationLaunchMetric in UI tests.
  • In the field on Android: Android vitals in Play Console, with comparison against a peer group of similar apps.
  • In the field on iOS: Xcode Organizer shows launch time by version, and MetricKit delivers aggregated metrics from users' devices.

Compare the median and the tails of the distribution — p90 and p95 — not just the average. Users on weak devices can have a completely different experience, and they're the ones most likely to abandon the app. We explained why lab testing on a flagship is misleading in our article on testing on inexpensive devices.

The method: trace, hypothesis, controlled release

In the Gmail Wear OS case study, the team analysed Perfetto traces: main thread state, time in the Runnable state (a sign of CPU contention), DEX file reading, binder transactions and JIT activity. Based on the findings, they made two groups of changes. Replacing the animated spinner with a static image and deferring the shimmer state improved startup latency by 50%. Enabling R8 rewriting of Baseline Profiles added another 20%.

What matters is not the percentage itself — on a two-core watch, removing an animation naturally has a bigger effect than on a phone — but the method: trace first, then a hypothesis, a controlled change and re-measurement. The team specifically recommends automating trace collection and validating every hypothesis with an A/B test.

The business side is well illustrated by the Lyft case from the Android Developers Blog: a 21% reduction in the drivers app's startup time came with a 5% increase in driver sessions.

First optimisation steps

  1. Measure a baseline. Cold TTID and TTFD on 2–3 devices of different classes, median and p90.
  2. Clean up Application.onCreate. Defer secondary SDK initialisation — analytics, chat, ads — until after the first screen or until first use. On Android, the App Startup library and lazy initialisation via Hilt help.
  3. Don't load what you don't need. The first screen should request only the data it displays. Cache the previous session's result and show it immediately.
  4. Get work off the main thread. Disk, network, deserialising large JSON — background only.
  5. Check heavy animations and layout. Animated splash, Lottie on the first screen, deep view hierarchies.
  6. Add Baseline Profiles for key journeys and verify the effect with Macrobenchmark. Don't forget R8 and, for profile rewriting, AGP 8.2 or newer.
  7. Protect the result. Add a startup benchmark to CI and compare every release with the previous one.

Typical mistakes

  • Measuring only TTID and reporting success while the user stares at a skeleton for several more seconds.
  • Testing a debug build: it lacks ART and R8 optimisations, so the numbers are meaningless.
  • Artificially extending the splash screen "for the brand" — users perceive it as slowness.
  • Relying on the average instead of p90.
  • Initialising a dozen SDKs in Application.onCreate "because the docs say so".
  • Optimising without re-measuring: some "improvements" have no effect at all.

Action plan

  1. Define the moment after which the user can actually work, and mark it with reportFullyDrawn().
  2. Set up Macrobenchmark or XCTApplicationLaunchMetric for cold start.
  3. Capture a baseline on a low-end, mid-range and flagship device.
  4. Check field data in Android vitals and Xcode Organizer.
  5. Work through the optimisation list above, one change at a time, re-measuring each.
  6. Add the benchmark to CI and watch for regressions.

Fast startup isn't a race for the smallest number. It's a short path to the first useful action, without the deception of skeleton screens and hidden unreadiness. We wrote about how that path fits into the overall first impression in our article on the first 60 seconds in an app, and about the business effect of speed using Zomato's experience.

Sources: Android Developers: How Gmail Wear OS improved startup; Android Developers: App startup time; Android vitals: App startup time; Apple WWDC 2019: Optimizing App Launch; Android Developers Blog: How a single Android developer improved Lyft's Drivers app startup time by 21% in one month; Nielsen Norman Group: Response Times.

Animation in Mobile Interfaces: When It Helps and When It Slows Users Down

Animation in Mobile Interfaces: When It Helps and When It Slows Users Down

Animation can explain a change of state, show the relationship between elements and make the interface's response tangible. But it can also delay an action, eat up the resources of a weak device and cause nausea in people who are sensitive to motion.

In our projects, debates about animation usually sound like "is it pretty or not". A more productive question is: what exactly does this motion explain to the user, and how much time does it take from them? Below are the criteria, numbers and testing routine we use to make animation work for the product rather than against it.

When motion makes sense

Functional animation answers one of four user questions:

  • Where did this come from? A card expands from the list item that was tapped, and the person understands how the screens relate.
  • Did the system hear me? A button reacts to the touch instantly, before the server responds.
  • What's happening now? A progress indicator shows that a request is running and the app hasn't frozen.
  • Did it work? A short completion confirmation removes the need to check the result manually.

If an animation answers none of these questions, it's most likely decorative. Decorative motion isn't forbidden, but it should be short, never block the main action, and switch off or simplify when the system reduce-motion setting is on.

Numbers worth keeping in mind

The classic response-time limits formulated by Jakob Nielsen still hold: about 0.1 s feels instantaneous, up to 1 s keeps the flow of thought uninterrupted, and beyond 10 s the person loses focus on the task. Transition animations live between the first and second limits.

Type of motionApproximate durationComment
Touch feedback (ripple, button state change)start within 100 msmust begin immediately, even if the action is still running
Small changes (switch, checkbox, icon)50–200 msshort tokens in Material 3
In-screen transitions, expanding a card250–400 msmedium tokens in Material 3
Full-screen transitions450–600 mslong tokens; longer only with a strong reason
Single-frame budget16.7 ms at 60 Hz, 8.3 ms at 120 Hzanything that doesn't fit is seen as a stutter

Android documentation distinguishes slow frames (16 to 700 ms), frozen frames (700 ms to 5 s) and ANRs, when the app doesn't respond to input for more than 5 seconds. A heavy animation on a weak device easily pushes a product over these limits. That's why we always test motion on inexpensive devices, not only on the developer's flagship.

Reduced motion and motion sensitivity

For people with vestibular disorders, parallax, full-screen zooms and fast rotations can trigger dizziness and nausea. According to a study by Agrawal and colleagues (Archives of Internal Medicine, 2009) based on the 2001–2004 NHANES national survey, 35.4% of US adults aged 40 and over showed signs of vestibular dysfunction. This is not a niche group.

Both platforms provide a signal you should respond to:

  • iOS: the Reduce Motion setting; in code, UIAccessibility.isReduceMotionEnabled or the accessibilityReduceMotion environment value in SwiftUI.
  • Android: the "Remove animations" setting sets the system animation duration scale to zero; you can check it via ValueAnimator.areAnimatorsEnabled().

Reducing motion doesn't mean removing all change. Replace slides and zooms with a gentle opacity fade, and parallax with a static background. WCAG criterion 2.3.3 (level AAA) explicitly recommends letting users disable motion triggered by interaction, and 2.2.2 requires that any automatic motion lasting longer than 5 seconds can be paused. For the broader context, see our article on mobile app accessibility.

Animation and performance: the Gmail Wear OS case

The clearest public example of what decorative motion costs is the Gmail team's Wear OS case study on Android Developers. While analysing a startup trace in Perfetto, the team saw CPU contention on a watch with two cores. They replaced the animated loading spinner with a single static image and deferred the shimmer state by prolonging the splash screen. That group of changes improved startup latency by 50%. The loading indicator itself was slowing down the very thing it was meant to report on.

On phones the effect is usually less dramatic, but the mechanics are the same: animation on the main thread competes with building the first screen, processing data and responding to touch.

How to test: not just the looks

  1. For every animation in the mock-ups, write down which of the four questions it answers. If none, shorten it or remove it.
  2. Compare the time to complete a key scenario with and without animation. On Android you can temporarily change the animation duration scale in developer options.
  3. Run the scenario on a weak device and capture FrameTimingMetric with Macrobenchmark, or look at Profile GPU Rendering.
  4. Test interruptions: what happens if you press Back in the middle of a transition or tap a button twice quickly?
  5. Turn on Reduce Motion and "Remove animations" and make sure the interface doesn't break and states stay clear.
  6. Test repeat visits: an animation that delights the first time is annoying the twentieth time.

Typical mistakes

  • Blocking animation: the button stays inactive until the transition ends, and a fast user "taps into the void".
  • A splash screen with a logo animating for 2–3 seconds even though the app is ready earlier.
  • Skeletons and shimmer where data arrives in 100 ms: the user sees flicker instead of content.
  • Ignoring reduced motion: parallax and full-screen zooms for everyone without exception.
  • Large Lottie animations on the first screen that increase both build size and startup time.
  • Animations synchronised with network requests that "freeze" when the response is delayed.

Pre-release checklist

  1. Every animation has a functional justification.
  2. Touch feedback starts within 100 ms; transitions fit into 200–400 ms.
  3. No animation blocks the main action.
  4. Reduce Motion on iOS and "Remove animations" on Android are supported.
  5. Automatic motion longer than 5 seconds can be paused.
  6. Key scenarios are checked on a weak device using FrameTimingMetric.
  7. The first screen doesn't run heavy animations before it becomes useful.

The goal of animation is not to show off the team's skill but to help the user understand what happened. If motion makes the wait longer, it works against the product.

Sources: Android Developers: What a great user experience looks like; Android Developers: Gmail Wear OS startup case study; Material Design 3: Easing and duration; Android Developers: Slow rendering; W3C: Understanding SC 2.3.3 Animation from Interactions; Agrawal et al.: Disorders of balance and vestibular function in US adults (2009); Nielsen Norman Group: Response Times — The 3 Important Limits.

Why Mobile Products Must Be Tested on Affordable Devices

Why Mobile Products Must Be Tested on Affordable Devices

An emulator on a powerful laptop and a flagship phone in a developer’s pocket create a false sense of quality. The app opens in a second, lists scroll smoothly, the camera focuses instantly. But a large share of the real audience uses phones with slower processors, less memory, cheaper storage and older OS versions — and that is exactly where problems the team never saw during development show up.

In our projects we keep seeing the same pattern: bug reports saying “it freezes”, “it crashes when I take a photo” or “it takes forever to load” almost always come from budget devices. That is why an affordable smartphone is not an optional extra for us but a mandatory part of the test fleet. Below is how we set up this kind of testing, which thresholds we use and which mistakes we recommend avoiding.

Why flagships and emulators are misleading

The difference between devices is not just CPU clock speed. Affordable phones have slower storage (often eMMC instead of UFS), so reading the database and unpacking resources at startup takes noticeably longer. Less RAM means the system kills background processes more aggressively: the user switches to a messenger, comes back, and the app starts from scratch, losing whatever they had typed. Under sustained load, cheaper chips overheat and throttle sooner, and some manufacturers add their own “battery optimisers” that stop background work.

Users do not perceive “low FPS” or “slow cold start” as separate technical events. They see a freeze, tap the button again, end up with a duplicate order or simply close the app. We covered why speed directly affects retention in our piece on Zomato’s experience.

What the Josh case study shows

A telling public example is Josh, an Indian short-video app whose story was published by the Android Developers team. The developers aimed for a consistent experience across high-end, mid-range and low-end devices and focused on cold start, because improving it automatically speeds up warm and hot starts as well.

  • The team profiled every block of code executed during startup and analysed system traces in Perfetto, Systrace and the Android Studio Profiler.
  • They disabled auto-initialisation of some third-party SDKs, removed legacy libraries and moved certain modules to the background.
  • They reduced the splash-screen drawables and optimised them for screen size.
  • Each change was validated in isolation by emulating cold starts and using Jetpack Macrobenchmark.

The result, according to the case study: startup became 30% faster for the average user and 3x faster for roughly 10% of users on older and low-end devices. Better bounce rates and retention helped Josh retain more than a million users compared with the baseline, and Play Store ratings trended upward. The key lesson: the biggest gains went to the people with the weakest phones.

Thresholds worth aiming for

To keep testing from becoming a subjective “feels slow”, you need numbers. Some of them are set by Google Play through Android vitals: exceeding the thresholds can reduce your app’s visibility in the store. Others are internal targets we use, and they should be read as studio experience.

MetricThresholdSource
Cold start (TTID)5 s or longer is considered excessiveAndroid vitals
Warm start2 s or longerAndroid vitals
Hot start1.5 s or longerAndroid vitals
User-perceived crash rate1.09% overall, 8% on a single phone modelAndroid vitals
User-perceived ANR rate0.47% overall, 8% on a single modelAndroid vitals
Frame budget≈16.7 ms at 60 Hz, ≈8.3 ms at 120 HzDisplay physics
Cold start on a budget devicetarget of 2–3 s to the first useful actionStudio target

Pay attention to the per-model thresholds. The average across all devices may look green while one popular budget model has crash rates of several percent — and that is a visibility and reputation problem in its own right.

Device matrix: the minimum to start with

The test fleet does not have to be large. Four or five devices are enough for us, provided they are chosen from data rather than from whatever happens to be lying around the office. Check the distribution of models, RAM and OS versions in Play Console, App Store Connect or your analytics.

  • One current flagship as the reference for design and animation.
  • One mid-range device running the Android version most common in your audience.
  • One affordable phone with 3–4 GB of RAM and slow storage.
  • The oldest iPhone still supported by your minimum iOS version.
  • If relevant, a device running Android Go edition, if you operate in markets where such phones are common.

A step-by-step testing process

  1. Define 5–7 key scenarios: first launch, sign-in, search, completing the core action, camera or file upload.
  2. Measure cold start on every device: on Android via the Displayed line in Logcat or Macrobenchmark, on iOS via Instruments. Repeat at least 10 times and take the median.
  3. Check scrolling of long lists, keyboard opening, image loading and screen rotation.
  4. Background the app, open a few heavy apps and return: form data and list position must survive.
  5. Throttle the network: speed profiles in the Android Emulator or Network Link Conditioner on iOS. Test switching between Wi‑Fi and mobile data.
  6. Repeat the key scenarios with battery saver on and a low battery level.
  7. Record not just the bug but the context: model, OS version, free memory, network state.

Common mistakes

  • Testing only debug builds. They are slower than release builds and distort measurements; measure performance on a release build with R8.
  • Initialising everything in Application.onCreate. Analytics, ads, support chat and an A/B platform at startup are a classic cause of slow launches, exactly as the Josh case shows.
  • Loading images at full resolution. On a weak device this is a direct route to an OutOfMemoryError.
  • Looking only at averages. Budget-device problems hide in the 90th and 95th percentiles.
  • Checking once before release. Performance regressions accumulate quietly, so measurements should be automated.

Pre-release checklist

  • Cold start on a budget device has been measured and is nowhere near the 5 s threshold.
  • Crash rate and ANR rate are below the Android vitals thresholds, including for your audience’s top models.
  • Form and navigation state is restored after process death.
  • Key scenarios have been run on a slow network and in battery saver mode.
  • Third-party SDKs not needed for the first screen are initialised lazily.
  • Startup metrics are tracked in production, not only in the test lab.

An affordable device is not a “lesser” user. It is a real environment in which the product has to keep its promise. Testing on it reduces abandonment and negative reviews, and with them the number of emergency fixes after release. After launch, look beyond downloads, at behaviour after install.

Sources: Android Developers: Josh app startup case study; Android vitals: core vitals and bad behavior thresholds; Android vitals: App startup time; Jetpack Macrobenchmark; Android: Build for Billions.

Zomato’s Experience: How App Speed Improved Customer Retention

Zomato’s Experience: How App Speed Improved Customer Retention

Mobile app speed is not only a technical metric. For a food-ordering service, it directly affects whether users see the menu, complete an order, and return the next day. The case of the Indian service Zomato is one of the best-documented examples of engineering optimization turning into a business result.

We will look at what the team did according to the public case study on Android Developers, what numbers stand behind the result, and how to repeat the approach in your own product without rewriting the app from scratch.

Context: why Zomato focused on speed

When the case was published, Zomato operated in more than 500 cities in India, had over 43 million active customers, and averaged more than 1.5 million orders a day. Rapid feature development had brought many SDKs that consumed resources even when they were not needed.

An additional factor was expansion into tier-2 and tier-3 cities, where people mostly use affordable devices with limited processing power. The team wanted the experience on those phones to match flagships. Priorities were chosen with a simple rubric: which solution gives the best return relative to developer effort. The optimization took about four months.

What the Zomato team did

The Android Developers case study describes a sequence of steps. First, the team used Perfetto to capture system traces of startup and see which SDKs initialized at launch and which could be removed or loaded lazily.

ActionBefore, sAfter, sImprovement
Removed legacy SDKs and unused third-party libraries4.8733.81321.74%
Lazy-loaded libraries (App Startup)3.8143.5776.2%
Layout improvements, ViewStub2.5292.3487.15%

A few details worth remembering:

  • Removing what was unused was the simplest and most profitable step: low effort, biggest gain.
  • The Facebook SDK was used for only one of the sign-in options but initialized on every launch. With the App Startup library, it was loaded only when the user chose Facebook sign-in.
  • ViewStub made it possible not to create UI elements until needed. Unlike View.GONE, such an element is not inflated and does not take memory. Together with a flatter hierarchy and merged layouts on the login screen, this cut inflation time by 7%.
  • Android Profiler helped find locking issues and memory overhead, and improvements to caching reduced out-of-memory errors by 60%.

Results: from milliseconds to orders

According to Firebase Performance’s cold startup metric, average time improved by about 25%, and by up to 30% on low- and mid-range devices.

The most important result was business-related. Zomato tracked an internal “app icon tap to fully loaded home page” metric. The number of users landing on a fully loaded page rose by about 20%, and Day 1 retention improved by about 90%. The overall “home → menu → cart → order” funnel conversion rose by about 1.5 percentage points, equivalent to around 600,000 additional orders per month.

An important caveat: these are one company’s results in a specific context — a huge market, many affordable devices, and a scenario where the user is hungry and impatient. Do not transfer the percentages to another product, but do transfer the mechanics.

How to repeat the approach, step by step

Performance work does not need to begin with a full rewrite. Here is the sequence we use in our projects:

  1. Define a business speed metric. Not just “startup time,” but time from tapping the icon to the first useful screen, as Zomato did.
  2. Measure a baseline on real devices. Include at least one affordable device your audience uses, not only the team’s phones. Record p50 and p90.
  3. Capture a startup trace (Perfetto, Android Studio Profiler, Instruments in Xcode) and split time into app initialization, SDKs, network requests, UI construction, and data.
  4. Start by removing. Build an SDK register: owner, purpose, when it initializes. Delete what is not used.
  5. Defer secondary work. Analytics, ads, support chat, and social sign-ins are rarely needed in the first second.
  6. Optimize the first screen: less nesting, deferred creation of hidden elements, cached recent data instead of waiting for the network.
  7. Lock in the result in CI: automated benchmarks (for example Macrobenchmark on Android) and a startup time budget that blocks a release when exceeded.
  8. Connect technical metrics to conversion and retention through before-and-after cohort analysis.

Startup time reference points

In its app startup time documentation, Google treats a cold start of 5 seconds or more, a warm start of 2 seconds or more, and a hot start of 1.5 seconds or more as excessive. That is the line where Android vitals flags a problem, not a goal.

Start typeExcessive per Android vitalsOur target (studio experience)
Cold5 s or moreUnder 2 s on a mid-range device, under 3 s on an affordable one
Warm2 s or moreUnder 1 s
Hot1.5 s or moreUnder 0.5 s

Our earlier article on 4.7 billion mobile internet users explains why affordable devices are not an edge case but a large share of the audience, and the piece on 5G and mobile apps explains why a fast network does not rescue a slow client.

Common mistakes in speed optimization

  • Measuring on a developer’s flagship and concluding there is no problem.
  • Optimizing by feel, without a trace or baseline.
  • Starting with a rewrite in a new technology before removing unnecessary SDKs.
  • Initializing every SDK in Application.onCreate “just in case.”
  • Showing an empty screen with a spinner instead of cached data.
  • Having no regression control: six months later, new features undo everything.
  • Reporting milliseconds instead of impact on conversion and retention.

Team checklist

  1. A business metric “to first useful screen” is defined.
  2. There is a p50 and p90 baseline on affordable and mid-range devices.
  3. A startup trace is captured and time is split by component.
  4. An SDK register with owners exists; unused SDKs are removed.
  5. Secondary libraries initialize lazily.
  6. The first screen shows cached data while the network refreshes.
  7. Startup benchmarks run in CI with a time budget.
  8. The effect is checked in cohorts by conversion and D1 retention.

The Zomato case matters because it connects engineering work to user behavior. Speed has value not by itself, but because it removes friction on the way to an outcome.

Sources:Android Developers: Increasing app speed by 30% at Zomato; Android Developers: App startup time; Android Developers: App Startup library; Perfetto.

5G and Mobile Apps: How Faster Networks Change User Experience

5G and Mobile Apps: How Faster Networks Change User Experience

5G is often described as a technology for higher speed. For a mobile product team, the more important change is in user expectations. People move between screens faster, watch more video and are less willing to forgive delays — even when they are standing in an underpass with a single bar of LTE.

In this article we explain what 5G really gives apps, where its benefits are overestimated and how we design a product’s network behaviour so it stays predictable on any connection.

What changes with 5G

In the June 2025 Ericsson report, 5G is presented not only as a faster radio link but as a foundation for richer digital journeys. According to the report, there were about 2.3 billion 5G subscriptions worldwide at the end of 2024, and fifth-generation networks already carried 35% of all mobile traffic. In its November report, the company expected more than 2.9 billion subscriptions by the end of 2025.

Higher capacity delivers media faster, and lower latency makes interactions feel closer to instant. The IMT-2020 requirements set user-plane latency targets of 4 ms for mobile broadband and 1 ms for ultra-reliable scenarios, but these are radio-interface targets. In real networks, a full request-to-server-response cycle takes tens of milliseconds or more, because routing, DNS, TLS and back-end processing are added on top.

Unevenness matters too. Ericsson estimated that at the end of 2025 only about half of the world’s population outside mainland China had 5G coverage. More than 90 operators have launched 5G Standalone networks, which enable network slicing and guaranteed quality for specific services, but for most consumer apps these capabilities remain a prospect rather than a baseline. Designing a product “for 5G” today means designing it for a mix of network generations.

Where 5G really gives a product an edge

ScenarioWhat 5G addsWhat remains the product’s job
Short video and feedsFaster playback start, smoother scrollingAdaptive bitrate, sensible prefetching
Video calls and streamsHigher bitrate, fewer stallsQuality degradation without dropping, session recovery
Large files and backupsFaster uploadsResumable chunked uploads, transparency about data plans
Real-time collaborationLower sync latencyConflict resolution, offline change queue
Navigation and ARFaster loading of maps and modelsLocal cache, working without a network along the route

In its study of video traffic on four European networks, Ericsson notes that 5G consistently improved the viewing experience: higher bitrates and shorter stalls for long-form video, faster start and smoother playback during rapid scrolling for short clips. But that advantage only materialises when the player knows how to use it.

Three common team mistakes

  1. Building only for ideal connectivity. An app that works well only on 5G becomes unpredictable for a large part of its audience: coverage is uneven, and the phone constantly switches between 5G, LTE and Wi-Fi.
  2. Confusing fast loading with good experience. A screen may appear quickly yet remain unusable if data and component states arrive chaotically and buttons jump under the user’s finger.
  3. Using extra bandwidth as an excuse for extra weight. Higher capacity is not permission to ship unlimited video, images or JavaScript. Users pay for it in data, battery and time on weaker connections.

How we design network behaviour

Start with journeys where the network creates real value: streaming video, collaboration, navigation, remote diagnostics or large files. For each, decide what can adapt: video quality, image resolution, list density, sync frequency.

Then describe at least three states for every journey:

  • Fast connection — full media quality and prefetching of the next content.
  • Slow or “expensive” connection — reduced quality, deferred background work, no autoplay of large files. On iOS, NWPathMonitor reports whether a path is expensive or constrained (Low Data Mode); on Android, NetworkCapabilities shows whether a network is metered and provides a bandwidth estimate.
  • Temporary offline — cached content, a queue of actions to send later and a clear status message.

One important nuance: do not check reachability before every request. Both Apple and Google advise simply making the request, handling the error properly and retrying with exponential backoff — the network state changes faster than an app can check it.

A step-by-step testing plan

  1. List 5–7 key journeys and mark the ones that depend on the network.
  2. Set a budget for each: time to the first useful action, data volume, acceptable retries.
  3. Test with Network Link Conditioner and Android Emulator profiles: fast network, unstable LTE, packet loss, full disconnection.
  4. Check network transitions in the middle of an operation: payment, photo upload, form submission.
  5. After release, track metrics by connection type: error rate, request duration, video interruptions.

Assess the business effect separately. Compare key-journey conversion, session length and video completion between users on 5G and LTE. If there is no difference, the bottleneck is most likely not the network but the back end, response size or interface logic.

A checklist for any network

  • Every network journey has three documented states.
  • Media adapts to connection quality automatically.
  • Unfinished actions are saved and resumed when the network returns.
  • The app respects Low Data Mode and Data Saver.
  • Retries use exponential backoff.
  • Analytics distinguishes 5G, LTE, Wi-Fi and offline.

We wrote in more detail about how growing mobile traffic changes performance requirements in our article on 146 exabytes a month.

5G works best as a multiplier for a well-designed experience. When the product logic is clear, network improvements make it smoother. When the logic is confusing, speed only gets the user to an error faster.

Sources: Ericsson Mobility Report, June 2025; Ericsson Mobility Report, November 2025; Ericsson: Short-form dominates video traffic; ITU-R M.2410: Minimum requirements for IMT-2020; Apple: NWPathMonitor; Android Developers: Read network state.

Journal

Ideas and products