# Performance

{% hint style="success" %}
This is the official documentation of Forest Admin Cloud.
{% endhint %}

### Fields

When adding new fields, make sure to think about how it will affect the performance and efficiency of your system. Remember these guidelines.

* **Avoid duplicate code**: Ensure that the handlers for different fields do not contain duplicated code. Fields may rely on each other, so organize dependencies logically without causing loops.
* **Reduce record duplication**: Reduce record processing by removing duplicates at the start to avoid unnecessary data retrieval.
* **Manage dependencies wisely**: Ensure your `dependencies` array includes only the fields you need. Extra dependencies can slow down processing and add unnecessary complexity.
* **Use batch API calls**: When working with arrays of records and using `.map()`, it's more efficient to make batch API calls rather than separate requests for each item.
* **Leverage relationships**: Leverage the `dependencies` array to link data whenever possible. This minimizes the need for additional queries.
* **Limit external queries**: Reduce external service queries to minimize performance issues.
* **Consider field quantity**: Think about the impacts of adding more fields to your handler. Extra fields may harm performance.
* **Use emulation cautiously:** Activating fields emulation demands fetching all records individually, leading to increased performance costs that scale linearly with record numbers.


---

# Agent Instructions: 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:

```
GET https://docs.forestadmin.com/cloud/best-practices/performance.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
