> For the complete documentation index, see [llms.txt](https://docs.madrix.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.madrix.dev/troubleshooting/performance-and-slowness.md).

# 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.

Before escalating, gather this evidence. It greatly reduces back-and-forth.

* Project and environment (Dev/Staging/Prod).
* Time of the error (with timezone).
* Steps to reproduce (short and deterministic).
* Full error message (no cropped screenshots).
* Screenshot of the screen (if applicable).
* Browser console (relevant errors and warnings).
* Tab **Network** (request that failed + status + payload, if there is no sensitive data).

{% hint style="info" %}
If there is a `requestId`, `traceId` or execution link, include it as well.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.madrix.dev/troubleshooting/performance-and-slowness.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
