# App performance

## Overview

The **Application Performance Dashboard** provides an accessible overview of method performance within your Servoy Cloud environment. It includes:

* **Detailed Table**: Displays essential performance metrics, such as call counts and average execution times for methods.
* **Performance Insights**: Offers access to each method’s call stack and related database queries, helping to identify and address performance issues.

<figure><img src="https://3933488479-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjpWd52BKwABWxF2lScUK%2Fuploads%2Fgit-blob-f3065d830d57ec3cf626b26821ebd47f3c6db178%2Fccc_env_app_perf_table.png?alt=media" alt=""><figcaption><p>Method Performance table view, highlighting the Performance Insights button</p></figcaption></figure>

## Performance Insights view

### Overview

**The Performance Insights** view within the App Performance dashboard offers a detailed analysis of method execution. This dialog displays information about each method's call structure and performance, allowing users to visualize and understand the method executions and their impact on application efficiency.

### Key features

* **Call Stack**: Displays the full hierarchy of method calls, including main methods and their nested calls, offering a clear view of execution flow.
* **Call Count & Average Runtime**: For each method, this shows how many times it was invoked and its average run time, helping to identify performance inefficiencies.
* **Query Details**: If a method triggers any database queries, these are displayed alongside the method.

### **Icons Overview**

* **Methods:** Represented by the **method** icon <img src="https://3933488479-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjpWd52BKwABWxF2lScUK%2Fuploads%2Fgit-blob-509f6c784098af58963fd30a1b811e89525c4a29%2Fccc_env_app_perf_treeview_method.jpg?alt=media" alt="" data-size="line">
* **User Input Methods:** Indicated by the **message** icon <img src="https://3933488479-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjpWd52BKwABWxF2lScUK%2Fuploads%2Fgit-blob-5b18106238aac3f119dc584d8f92b5f02f3f57e5%2Fccc_env_app_perf_treeview_userinput.jpg?alt=media" alt="" data-size="line">

  These methods await user input, which may contribute to longer run times.
* **Queries:** Represented by the **database** icon <img src="https://3933488479-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjpWd52BKwABWxF2lScUK%2Fuploads%2Fgit-blob-abd78a19609df21d4b3680b85226c89115940111%2Fccc_env_app_perf_treeview_query.jpg?alt=media" alt="" data-size="line">

<figure><img src="https://3933488479-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjpWd52BKwABWxF2lScUK%2Fuploads%2Fgit-blob-42c772cd5d0bc5b700e8beb7e794a7a7a58905df%2Fimage-1.png?alt=media" alt=""><figcaption><p>Performance Insights highlighting different icons</p></figcaption></figure>

### **How to access**

To view detailed performance insights, explore the method’s call stack, associated queries, and performance metrics for a specific method:

1. Navigate to the method in the performance table.
   * `Environment Details -> App Performance`
2. Open the **Performance Insights** view
   * Click the **i** (information) icon next to the method from the table-view

## Performance alerts

### **Needs Attention (500ms)**

A performance metric needs attention once the average execution time exceeds 500ms. This value indicates that a performance metric is approaching a state that may degrade application performance and should be investigated.

### **Critical (1000ms)**

A performance metric is critical once the average execution time exceeds 1000ms. A critical metric has a significant impact on the application's functionality and user experience. Immediate action is required to address issues at this level.

### **User Input**

Methods flagged as user input are those that require input, such as dialogs. Their higher average time may be due to waiting for feedback and should not be considered as poor performance.

{% hint style="warning" %}
Methods flagged as Needs Attention should be investigated and methods flagged as Critical, require immediate attention.
{% endhint %}

## Minimum method duration

Each Servoy Cloud environment has a default minimum method duration threshold set to 20ms. This is used for assessing the application's method performance.

You can change the minimum duration of methods displayed in the Application performance table, by following these steps:

1. Go to Admin Settings
2. Click on [Environment](https://docs.servoy.com/reference/servoy-cloud/administration/settings#environment) Tab
3. Change the value of “Min method duration”
4. Save changes
