> ## Documentation Index
> Fetch the complete documentation index at: https://docs.germainux.com/llms.txt
> Use this file to discover all available pages before exploring further.

# JavaScript Long Task Or Browser Freeze Detection Configuration

> GermainUX detects long-running JavaScript tasks that block the browser’s main thread and can make a web application slow or temporarily unresponsive.

Components
[`JS Profiler`](https://docs.germainux.com/main/germain-ux-js-profiler)
[`RUM JS`](https://docs.germainux.com/main/germain-ux-rum-js)
[`RUM Extension`](https://docs.germainux.com/main/germain-ux-rum-extension)

Availability
2022.1 or later

Browser support
only latest Chrome, Edge and Opera

> **[Monitoring components](#monitoring-components)**
>
> Parts needed for detection

> **[Business benefits](#business-benefits)**
>
> Gains from faster responsiveness

> **[Configuration](#configuration)**
>
> Works with defaults

> **[Deployment and configuration](#deployment-and-configuration)**
>
> Setup for freeze detection

## Overview

GermainUX detects long-running JavaScript tasks that block the browser’s main thread and can make a web application slow or temporarily unresponsive.

By default, GermainUX records a JavaScript Long Task when uninterrupted activity occupies the browser’s main thread for at least three seconds. This monitoring is enabled by default for each applicable User Monitoring Profile.

![JavaScript Long Task Or Browser Freeze Detection Configuration](https://mintcdn.com/germain-ux/S6CZjLTFu68xyZFG/images/main/javascript-long-task-monitoring/image-20260903-211038.png?fit=max\&auto=format\&n=S6CZjLTFu68xyZFG\&q=85\&s=fbd37eb3695f34303ea57c6049065f09)

## Monitoring components

| Component | Role |
| - | - |
| [GermainUX RUM JS](https://docs.germainux.com/main/germain-ux-rum-js.md) | Continuously detects long-running browser tasks when the monitoring script can be deployed in the application. |
| [GermainUX RUM Extension](https://docs.germainux.com/main/germain-ux-rum-extension.md) | Provides browser monitoring when RUM JS cannot be deployed directly or access to the complete browser-page context requires an extension. |
| [GermainUX JS Profiler](https://docs.germainux.com/main/germain-ux-js-profiler.md) | Captures JavaScript function execution, timing, browser activity, DOM activity, and other code-level evidence needed to investigate a long task or freeze. |

## What is a JavaScript Long Task?

The browser’s main thread handles JavaScript execution, user input, rendering, and other page activity. When a task occupies that thread for too long, the browser cannot respond promptly to the user.

A long task can cause:

| User impact | Description |
| - | - |
| Browser freeze | The page appears temporarily unresponsive. |
| Delayed interactions | Clicks, typing, scrolling, or other inputs are processed late. |
| Poor animation and scrolling | Visual updates become slow or interrupted. |
| Delayed rendering | Page content or application changes take longer to appear. |
| Reduced responsiveness | The application reacts slowly even when the server is performing normally. |

A long task indicates blocked browser execution. It does not necessarily mean that the browser or application crashed. \
&#x20;S

![Long Tasks on Drill-through](https://mintcdn.com/germain-ux/S6CZjLTFu68xyZFG/images/main/javascript-long-task-monitoring/image-20230327-103024.png?fit=max\&auto=format\&n=S6CZjLTFu68xyZFG\&q=85\&s=c642fb5eaf1119083805361a0a7542a8)

## Capabilities

GermainUX helps teams:

* Detect long-running tasks during real user sessions.
* Identify when and where the browser became unresponsive.
* Determine the affected users, pages, sessions, and business workflows.
* Correlate long tasks with clicks, navigation, errors, network activity, memory usage, and other browser events.
* Review what the user experienced through Session Replay.
* Measure the frequency, duration, trend, and user impact of browser freezes.

> **Show all 9**
>
> * Identify pages, workflows, browsers, or releases with the greatest concentration of long tasks.
> * Use the JS Profiler to investigate the JavaScript functions and browser activity responsible for the delay.
> * Validate whether an application correction reduced or eliminated the problem.

## Continuous monitoring

GermainUX RUM JS or the GermainUX RUM Extension continuously detects long tasks during real user activity.

Use:

* **RUM JS** when the monitoring script can be added directly to the application.
* **RUM Extension** when direct script deployment is unavailable or the application’s security model prevents access to the required browser context.

Each detected long task is associated with the available application, page, browser, user, and session context.

## Code-level investigation with JS Profiler

When continuous monitoring identifies a long task or browser freeze, the GermainUX JS Profiler can provide deeper diagnostic evidence, including:

* JavaScript function execution.
* Function duration.
* Exclusive and cumulative execution time.
* Long-running browser tasks.
* Browser events and user interactions.
* JavaScript errors and stack traces.

> **Show all 9**
>
> * DOM and rendering activity.
> * Network requests and resource loading.
> * Application, page, and session context.

This evidence helps identify whether the delay was caused by an expensive function, repeated processing, excessive DOM activity, resource loading, or another front-end operation.

The JS Profiler complements continuous monitoring. RUM JS or the RUM Extension can remain enabled across the user population, while deeper profiling should normally be limited to the affected application, users, pages, or investigation period.

## Business benefits

JavaScript Long Task and Browser Freeze Monitoring helps organizations:

* Detect browser responsiveness problems affecting real users.
* Distinguish front-end execution delays from server or network latency.
* Identify the users and business workflows experiencing the greatest impact.
* Reduce the time required to reproduce intermittent browser freezes.
* Move from a reported symptom to the JavaScript activity associated with it.
* Prioritize corrections based on frequency and actual user impact.
* Detect performance regressions introduced by new releases.
* Validate improvements using real-user evidence.

## Analytics

GermainUX can analyze long tasks through KPIs, measures, pivots, trends, drill-through views, and session context.

| Analysis area | Examples |
| - | - |
| Duration | Length of each long task or freeze |
| Frequency | Occurrence count, recurrence, concentration, and trend |
| Impact | Affected users, sessions, pages, and workflows |
| Environment | Application, release, browser, operating system, and device |
| User context | Clicks, typing, scrolling, navigation, and Session Replay |
| Related evidence | JavaScript errors, memory usage, network requests, and resources |
| Code-level evidence | Functions, execution time, DOM activity, and browser events |

GermainUX users can create watches to receive notifications when collected long-task insights meet conditions of interest.

## Configuration

No configuration is required to use the default three-second threshold.

### Change the long-task threshold

Use `settings.plugins.performance.longtaskThresholdMillis` to change the minimum duration required for GermainUX to record a long task.

The value is specified in milliseconds. The following example records tasks lasting at least five seconds:

```javascript theme={null}
const settings = germainApm.getDefaultSettings();

settings.plugins.performance.longtaskThresholdMillis = 5000;

germainApm.start(settings);
```

Choose a threshold that reflects the application’s expected behavior and monitoring objectives. A lower threshold detects shorter periods of main-thread blocking but generates more monitoring data.

## Recommended investigation workflow

1. Use RUM JS or the RUM Extension to detect long tasks affecting real users.
2. Identify the affected applications, pages, workflows, users, and sessions.
3. Review the user’s experience through Session Replay.
4. Correlate the event with clicks, JavaScript errors, network requests, memory usage, and other browser activity.
5. Enable the JS Profiler for a controlled scope when code-level evidence is required.
6. Identify the responsible JavaScript function, script, component, resource, or dependency.
7. Implement the correction.
8. Validate the result using continuous long-task monitoring and, when necessary, another targeted profiling session.

## Browser support

JavaScript Long Task monitoring depends on browser APIs supported by recent versions of:

* Google Chrome
* Microsoft Edge
* Opera

RUM Extension and JS Profiler support also depends on the installed extension version, permissions, application architecture, and enterprise browser policies.

## Deployment and configuration

* Review [Browser Monitoring](https://docs.germainux.com/main/browser-monitoring.md).
* Review the [Browser Monitoring Deployment Overview](https://docs.germainux.com/main/deployment-for-browser-monitoring.md).
* Deploy [GermainUX RUM JS](https://docs.germainux.com/main/germain-ux-rum-js.md) when the monitoring script can be added to the application.
* Deploy the [GermainUX RUM Extension](https://docs.germainux.com/main/germain-ux-rum-extension.md) when direct script deployment is unavailable or access to the complete browser-page context requires an extension.
* Deploy the [GermainUX JS Profiler](https://docs.germainux.com/main/germain-ux-js-profiler.md) for deeper JavaScript execution and code-level diagnostics.
* Review the available [Browser Monitoring configuration](https://docs.germainux.com/main/configuration-for-browser-monitoring.md).

> **Show all 10**
>
> * Review [JavaScript and Page Memory Monitoring](https://docs.germainux.com/main/javascript-and-page-memory-monitoring.md).
> * Review [JavaScript Console and Error Monitoring](https://docs.germainux.com/main/javascript-console-and-error-monitoring.md).
> * Review the [KPIs for User Monitoring and Replay](https://docs.germainux.com/main/user-monitoring-and-replay-kpis.md).
> * Review the available Browser Monitoring KPIs.

## Get Help

> **[Contact GermainUX Support](https://docs.germainux.com/main/support.md)**
>
> The Germain Team can help you set this up.

> **Can't find what you need?**
>
> Search all GermainUX docs with **Ctrl + K**, or use the feedback buttons at the bottom of this page to tell us what is missing.

The content of this document is proprietary to GERMAIN SOFTWARE.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.