Performance in web applications: where slowness comes from
Slow applications lose users quietly. The five places slowness hides, how to find which one, and what fixes each.
The short answer
Slow applications lose users quietly: nobody complains, they just do the task somewhere else or avoid it. Slowness hides in five places, and every slow screen has one dominant cause among them. Database queries that fetch too much or lack an index. Too many round trips between browser and server, or between server and database. Heavy front-end bundles that make the browser do work before anything appears. Slow external calls that the screen waits on. And work repeated on every request that could have been done once and cached. The way to find the cause is a trace of one slow request, not a debate, and most fixes are boring once the cause is named.
The five places
| Place | How it shows | Typical cause | Typical fix |
|---|---|---|---|
| Database | Lists and searches slow; slower as data grows | Missing index; a query per row instead of one query; fetching everything to show ten | Indexes; batch queries; pagination; select only needed fields |
| Round trips | Screens that load in stages; spinners in sequence | Many small requests instead of one; waterfall of dependent calls | Combine requests; load in parallel; fetch what the screen needs in one go |
| Front end | Slow to appear, slow to respond after loading | Large JavaScript bundles; heavy libraries; rendering huge lists | Split code by route; drop heavy dependencies; virtualise long lists |
| External calls | Unpredictable hangs | Waiting synchronously on a third-party API | Timeouts; caching; move to background jobs; show partial results |
| Repeated work | Everything a little slow, servers busy | Recomputing the same thing per request; no caching | Cache computed results; precompute in background jobs |
The method
- Collect real-user timings per screen, so you know which screens are slow and for whom.
- Trace the worst screen and read where the time went.
- Fix the dominant cause with the boring fix from the table.
- Measure again; repeat for the next screen.
- Set a budget per screen: time to usable, request count, bundle size.
- Check the budget in the pipeline so a change that breaks it is caught before release.
Keeping it fast
Performance is easier to keep than to recover. Budgets checked in the pipeline catch regressions on the day they are introduced. Real-user monitoring shows drift as data grows and usage changes. A quarterly look at the slowest screens keeps the list short. And the habit of tracing before touching anything keeps effort where it matters rather than where someone guessed.
What this means for you
When an application feels slow, insist on measurement: real-user timings to find the screens, a trace to find the cause, a boring fix aimed at it. Database queries, round trips, front-end weight, external calls and repeated work cover nearly everything. Set budgets, check them in the pipeline, and treat a slow screen as a defect with a number attached rather than a reason to buy a bigger server.
Frequently asked questions
The app is slow. Where do we start?
With measurement, not opinion. Real-user timings show which screens are slow for whom. A trace of one slow request shows where the time went: waiting for the database, calling an external service, rendering, or shipping and running JavaScript in the browser. Nearly every slow screen has one dominant cause, and the trace names it in minutes.
Is it the server, the database or the front end?
Usually the database for screens that list or search, the front end for screens that feel sluggish after loading, and external calls for screens that hang unpredictably. But usually is not a diagnosis. One trace per slow screen replaces the debate with a number per layer.
Will a bigger server fix it?
Rarely for long. A query that loads a thousand rows one at a time is slow on any server; a front end that ships several megabytes of JavaScript is slow on any connection. More hardware buys weeks; fixing the query or the bundle buys years. Measure first, then decide whether hardware is even relevant.
Sources
- web.dev: Learn performance (accessed 2026-09-12)