# Performance and slowness

### When to use

* UI slow to load lists and forms.
* API timeouts.
* Slowness only in one environment (e.g., Prod).

### Quick checklist (2 min)

1. Compare Dev vs Staging vs Prod.
2. Test with a “clean” user (without much data).
3. Isolate: is it UI, API, or database?

### Diagnosis

#### 1) Is it client-side or server-side?

* Client-side: high CPU in the browser, heavy rendering.
* Server-side: slow requests in Network, high time-to-first-byte.

#### 2) Data and queries

* Lists without pagination tend to degrade quickly.
* Filters and sorts may require indexes.

#### 3) Integrations

* Do calls to external services block the main request?
* Are timeouts configured?

### How to resolve (patterns)

* **Slow lists**: pagination, mandatory filters, reduce columns.
* **Slow API**: review critical endpoints and queries.
* **Database**: indexes, avoid N+1, review recent migrations.

### When to escalate

* SLA affected in Staging/Prod.
* Abrupt degradation after release.
* Frequent and repeatable timeouts.
