Application performance optimization: how to find what slows your app and fix it

Application performance optimization means measuring how fast and stable your app is for real users, finding the part that slows it down, and fixing the biggest cause first. For web pages, Google's Core Web Vitals set clear targets: the main content loads within 2.5 seconds, the page reacts to input in 200 milliseconds or less, and the layout stays visually stable. This guide is for owners of a web or mobile product that feels slow.
What is software performance optimization?
Software performance optimization, also called application performance tuning, is the work of making an existing app respond faster, stay stable under load, and use fewer resources, without changing what it does for the user. It covers four things a user or a business notices: how fast screens load, how quickly the app reacts to a tap or a click, how often it freezes or fails under load, and how much the servers cost to keep it running.
Optimization is different from a rebuild. It keeps the product and changes the part that causes the delay: a query, an image, a script, a server setting. It is also not a one-time project. Every release can bring a new slowdown, so the measurement that found the first problem stays in place to catch the next one.
Why a slow app costs you money
A slow app loses users before they reach the step that pays for the product, it can lose visibility in search and in the stores, and it can cost more to run on your servers. Google and a study it commissioned document the first three effects.
- Conversions: in a 2020 study commissioned by Google and carried out by 55 and Deloitte, the researchers analyzed four weeks of mobile site data from 37 retail, travel, luxury, and lead generation brands in Europe and the US. When four speed metrics improved by 0.1 seconds, retail sites saw 8.4% more conversions and travel sites 10.1% more.
- Search: Google's Search Central documentation recommends good Core Web Vitals “for success with Search” and says this, along with other page experience aspects, aligns with what its core ranking systems seek to reward.
- App stores: Google Play sets bad behavior thresholds for Android apps: a user-perceived crash rate of 1.09% and a user-perceived ANR (Application Not Responding) rate of 0.47%, averaged across devices. These core vitals affect how visible the app is on Google Play.
The fourth cost is your own: servers. Code that does the same work twice, or a database that reads a whole table to find one row, needs more computing power for the same traffic, and the cloud bill grows with it.
Which metrics to measure, and what good looks like
Measure what users feel first, then what the servers do. For the web, start with the three Core Web Vitals from real visits. For mobile, start with crashes, freezes, and launch time from the store consoles. Then add response times and error rates from your own monitoring, because they show which part of the system causes the delay.
| Metric | What it shows | Target or limit | Where to read it |
|---|---|---|---|
| Largest Contentful Paint (LCP) | How fast the main content of a page appears | Within 2.5 seconds | PageSpeed Insights, Search Console |
| Interaction to Next Paint (INP) | How fast the page reacts to taps, clicks, and typing | 200 milliseconds or less | PageSpeed Insights, Search Console |
| Cumulative Layout Shift (CLS) | How much the layout jumps while the page loads | 0.1 or less | PageSpeed Insights, Search Console |
| User-perceived crash rate (Android) | Share of daily users who had at least one crash they likely noticed | Stay under 1.09% on average across devices (Google Play's bad behavior threshold) | Android vitals in Google Play Console |
| User-perceived ANR rate (Android) | Share of daily users who had at least one freeze they likely noticed | Stay under 0.47% on average across devices (Google Play's bad behavior threshold) | Android vitals in Google Play Console |
| Launch time, hangs, memory (iOS) | How the app starts and responds on users' iPhones | Better than your previous release | Xcode Organizer |
| API response time and error rate | Which requests are slow or fail on the server | Set from your own baseline | Your monitoring and error tracking |
Google's Web Vitals guidance measures the three web targets at the 75th percentile of page loads, separately for mobile and desktop. In other words, three out of four page loads should meet the target, not the average one. An ANR is the error Android raises when the app's main thread is blocked for too long, for example when the app does not respond to a tap within 5 seconds.
Field data and lab data are not the same thing
PageSpeed Insights shows two kinds of numbers for a page. Field data comes from real Chrome users over the previous 28 days; this shows what your visitors experienced. Lab data comes from a Lighthouse test in a simulated environment; it is repeatable, so it is useful for checking a fix before release. When the two disagree, use the field data to decide whether real users have a problem and how urgent it is, and use the lab test, with its diagnostics, to reproduce the problem, find its cause and compare versions.
For iOS, the Xcode Organizer plays the field-data role: it collects anonymized launch times, memory use, responsiveness, and battery impact from your users and compares them between app versions.
Where performance bottlenecks usually hide
A slow screen is a symptom, and the cause can sit in any layer between the user and the database. The same complaint, “the order page is slow,” can come from a heavy image, a missing database index, or a payment provider that takes seconds to answer. That is why the first job is to find the layer with measurements.

- Frontend: large images and scripts, too many requests before the first screen shows, and code that blocks the browser while it runs.
- API and backend: one page that triggers dozens of database queries, and slow work such as sending emails or building reports done while the user waits.
- Database: missing indexes, queries that read far more rows than they return, and tables that grew for years without anyone changing how they are read.
- Infrastructure: servers that are too small for peak traffic, no automatic scaling, and no CDN, so users far from the server region wait longer for every file.
- Third-party services: payment, maps, chat, and analytics scripts that you do not control but that your screens wait for.
- Mobile client: heavy work on the main thread, long lists that render every item at once, and a startup that loads everything before the first screen.
- AI features: a language model writes its answer piece by piece, so a long answer takes longer. OpenAI's latency optimization guide notes that “cutting 50% of your output tokens may cut ~50% of your latency,” that smaller models usually run faster, and that showing the answer while it is still being written shortens the wait the user feels. Track the time to the first words and the time to the full answer as two metrics.
How to optimize application performance, step by step
Performance work goes in a loop: measure, find the cause, fix it, measure again, and keep the measurement running. The order matters more than any single technique, because a fix aimed at the wrong layer costs time and leaves the delay where it was.
- Record a baseline. Write down the current field numbers for your most important pages and screens, plus how long server requests take and how often they fail, before anyone changes code.
- Pick the journeys that matter. Sign-up, search, checkout, and the main daily task can matter more than the home page. Rank them by how much money or use depends on them.
- Trace one slow request end to end. Follow it from the screen through the API to the database and outside services, and see where the time goes. Tracing tools such as Sentry, Datadog, New Relic, or Grafana Tempo follow a request across services; Chrome DevTools, the database's EXPLAIN command, Android Studio profilers, and Xcode Instruments show the cause inside one layer.
- Fix the biggest cause first. Change one thing at a time, so you know which change helped.
- Measure again on the same metric. Compare with the baseline in the lab before release and in the field after it. Before a known traffic peak, run a load test; our load-testing playbook for peak traffic describes how we run it.
- Guard against regressions. Keep alerts on the metrics you fixed and check them after every release, so a slowdown is caught in days rather than found by users.
“Agree on what ‘fast enough’ means before anyone starts. When the slow journey meets its target for real users, more tuning there adds little, and the time is better spent on the next journey on the list.”
Alexander Storozhevsky, Lead developer at Ronas IT
Common fixes and their trade-offs
Pick the fix for the layer your measurements point to. The table pairs common fixes with the problem they solve and the trade-off to plan for.
| Fix | Problem it solves | Trade-off |
|---|---|---|
| Smaller images, modern formats, lazy loading | Slow first screen, high LCP | Image pipeline to set up and maintain |
| Server-side rendering, splitting scripts | Blank screen while scripts load, slow input response | More work on the server, more complex builds |
| Database indexes and rewritten queries | Slow lists, search, and reports | Slightly slower writes and more storage |
| Cache for data read often and changed rarely | The same data computed or read again for every user | Users can see stale data if the cache is not cleared on change |
| Background jobs and queues | Users wait for emails, exports, or calls to other services | A queue to monitor, and results that arrive later |
| CDN and a server region closer to users | Slow loading for users far from the servers | Extra service cost, cache rules to manage |
| More servers and automatic scaling | Slowdowns and errors at traffic peaks | Higher cloud bill; it hides inefficient code instead of fixing it |
Adding servers can be the most expensive fix. It helps when the code is already efficient and traffic really outgrew the setup. When one query or one script causes the delay, more servers only make the same waste bigger.
Server-side rendering also helps search visibility. On the OddsCrowd web app, a community platform for sports bettors, we chose Nuxt on the frontend for server-side rendering, because the product needed search visibility.
How to find what slows down each layer
The fixes in the table work only when they target the exact cause. These are the checks and details that decide whether a fix helps in each layer.
Web pages: split LCP into its parts
Google's LCP guide splits the metric into four parts: time to first byte, the delay before the main image starts loading, the time it takes to load, and the delay before it is drawn. Each part has a different fix. A long first byte points to the server or the CDN. A long delay before loading usually means the browser found the image late, so the guide says never to lazy-load the LCP image and to give it fetchpriority="high". Lazy loading stays right for images further down the page.
In React and Next.js apps, check for hydration mismatches, where the HTML from the server differs from what the browser renders. Ivan Akulov of 3perf explains that since React 18 a mismatch makes React replace the server-rendered page content instead of patching it. The page looks the same, but the new elements count as a new LCP, which on typical mobile connections can add a few seconds. A Chrome DevTools trace with two LCP candidates for the same element, seconds apart, and React error #418 in the console are the signs.
Web pages: keep tasks short for INP
Slow responses to clicks and typing come from long tasks on the main thread. Google calls any task over 50 milliseconds a long task, and the browser cannot react to input until it ends. The fix is to split the work and give the main thread back between parts, with scheduler.yield() where the browser supports it. In React, startTransition marks an update as non-blocking, so a heavy list re-render does not freeze the input field that started it.
Backend: count the queries behind each request
One backend cause to rule out first is a page that runs one database query for each item of a list. In Laravel, Model::preventLazyLoading() makes this an error outside production, so the problem shows up in development and tests instead of in the monitoring. For slow single queries, run the database's EXPLAIN and look for full table scans and sorts that an index could avoid. Check the plan on a copy with production-sized data, because the database can choose a different plan for a small test table.
Queues need their own check. A queue moves slow work out of the request, but it does not add capacity, and a system whose capacity falls a little short of its load builds minutes of delay while the server-side response time still looks normal. Monitor the age of the oldest job in each queue along with the request times.
Mobile and real-time: measure in release builds and send less
Profile a React Native app in a release build. In a 2026 benchmark on the Expo blog, 50 views animated with Reanimated took about 29 milliseconds per frame on a mid-range Android phone in a debug build and about 12 in a release build, against the 16.7 milliseconds a frame has at 60 frames per second. Jank seen only in debug may not reach users.
For chat, live scores, and other real-time screens, the size of each update matters as much as the server. Discord found that one type of update, for servers a user was not actively reading, took 35% of its gateway bandwidth. A new version that sends only what changed since the last update cut it to 5%, and together with zstandard compression its clients used almost 40% less gateway bandwidth.
When optimization is not enough
Optimization works while the app's design can carry the load. It stops working when fixes no longer hold or the code is too risky to change. Two signs come from the design: the same problem returns after each fix, or the slow part cannot change without touching most of the system. Two come from the state of the code: one change breaks unrelated screens because the code has no tests, or the framework no longer gets updates.
In that case the choice is between refactoring the slow part, rebuilding it, and rebuilding the whole app. When we audit an existing product, we review the code with automated tools and by hand and give a written verdict on what to keep, refactor, or rewrite. Our guide to mobile app maintenance describes one audit where rebuilding came out cheaper than making the old code safe to change.
“The audit answers what the code can carry. The owner still has to weigh that against where the product is going: a part you plan to remove soon is a poor place for a rewrite, even when its code is weak.”
Roman Surikov, CEO at Ronas IT
How we keep performance from slipping after launch
On our projects, we check performance at three points: before each code change is merged, on a schedule, and in production.

- Before each change is merged: a bot adds a review checklist to every merge request, which is how a developer asks to add a change to your code. The checklist includes “performance not degraded.” Every commit, including one with code written with an AI agent, also goes through automated tests and QA agents, and then an engineer reviews and accepts it.
- On a schedule: our shared templates for CI, the automated pipeline that builds and checks the code, include a scheduled page audit that checks many pages in one run. Because the audit repeats, it catches a slowdown from a release nobody expected to affect speed, which one check at launch would not see.
- In production: error tracking is a default on every frontend project, and we create its monitoring project in your own account. After launch, our default setup monitors your servers with Grafana and Prometheus, and regular work includes security updates and a review of performance against cost. A DevOps engineer can add an agent that flags health problems, and the engineer handles its alerts; this is part of DevOps and hosting, from $200 per month. If we host the project on Kubernetes, a cost monitor shows the cloud bill from the first day.
How much application performance optimization costs
The first step is a technical audit. With us, it runs as an analysis phase, $1,000 to $2,000, with the scope set after a first look at your codebase. The fixes are not part of that price. They are estimated from the audit results, because one missing index and a redesign of the data model are very different amounts of work.
| Work | Price | When it fits |
|---|---|---|
| Technical audit, run as an analysis phase | $1,000-$2,000 | You do not know the cause, or need an expert answer on scaling or architecture, and want a written verdict and a fix plan |
| DevOps and hosting | From $200 per month | Hosting of one project with its environments, release pipeline, and monitoring; fixing a cause in the infrastructure, such as a migration or a new setup, is estimated separately |
| Dedicated development team | From $8,000 per month | The fix plan is large, a rebuild of part of the app is needed, or your team needs developers for part of the fixes |
| Support for one app | From $1,000 per month | Monitoring, bug fixes, and OS and SDK updates for a web or mobile app; new features are extra |
| Support for the whole system | From $2,000 per month | The same care for a web product with its mobile apps and backend |
Your hosting and outside services are billed by their providers, separately from our work. A good performance project can lower that bill, because an app that does less wasted work needs fewer servers.
How to choose a team for performance work
Choose a team that asks for your data before it offers a fix. A proposal that names the solution before anyone has seen your monitoring is a guess. These questions help you tell the difference.
- What will you measure first? A good answer names the field data, the traces, and the journeys they will look at.
- How will we know a fix worked? The answer should be the same metric, measured before and after the change.
- What does each fix cost us later? A cache, a queue, or more servers each add something to maintain or pay for. The team should say what.
- What do we get at the end of the audit? Expect a written verdict and a fix plan with an estimate, not only a list of scores.
- Where will the monitoring live? It should run in your own accounts, so you keep the history if you change teams.
What to do next
- Run PageSpeed Insights on your three most important pages and write down the field numbers for LCP, INP, and CLS.
- For a mobile app, open Android vitals and the Xcode Organizer and compare crash, ANR, and launch numbers with the targets and limits in the metrics table.
- Write down which journey feels slow, for whom, and since which release.
- Check that error tracking and server monitoring are running in your own accounts.
- If the cause is still unclear, book a technical audit.







