# Diagnose slow application startup caused by blocking JavaScript with io.Insights

**URL:** <https://community.interop.io/t/diagnose-slow-application-startup-caused-by-blocking-javascript-with-io-insights/791>\
**Category:** io.Insights\
**Created:** [November 23, 2026, 10:14am UTC](https://community.interop.io/t/diagnose-slow-application-startup-caused-by-blocking-javascript-with-io-insights/791 "2026-11-23T10:14:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![toni.petrov](https://yyz2.discourse-cdn.com/flex028/user_avatar/community.interop.io/toni.petrov/32/17_2.png) [@toni.petrov](https://community.interop.io/u/toni.petrov)\
**Post date:** [November 23, 2026, 10:14am UTC](https://community.interop.io/t/diagnose-slow-application-startup-caused-by-blocking-javascript-with-io-insights/791/1 "2026-11-23T10:14:12Z")

</div>

A web application running in io.Connect Desktop can be slow to open because its own JavaScript is keeping the page busy during startup. With io.Insights, you can inspect the startup trace and distinguish time spent loading resources from time spent executing application code.

This tutorial follows a long page-load handler to an event-loop blocking span that identifies `buildSearchIndex`, a function running for roughly nine seconds during startup.

## Prerequisites

- An io.Connect Desktop 10.5 or later with io.Insights and trace collection enabled.
- Software for viewing the captured trace, such as Jaeger or Grafana with a tracing data source configured.
- This walkthrough assumes you already collect traces. It does not cover deploying a collector or recreating the demo application.

## 1. Find where startup time is spent

Open the affected application’s startup trace and inspect the sequence from window creation into page loading. Look at resource requests and the page’s event handlers to see where the long operations occur.

In this example, the visible resource spans are short, while `navigation.contentLoadedHandlers` takes **9.17 seconds**. An `eventLoopBlocking` span covers nearly the same interval and lasts **9.16 seconds**.

[![Startup trace showing short resource loads and overlapping 9.17-second page-handler and 9.16-second event-loop blocking spans.](https://canada1.discourse-cdn.com/flex028/uploads/interopio/original/1X/dedd19d23c45ffe56c5005e46688017053e26dda.png)](https://canada1.discourse-cdn.com/flex028/uploads/interopio/original/1X/2f284647adb27d07101d546eade0593d913a4e17.jpeg)

_The two long spans overlap: do not add their durations together. [View the full screenshot](https://canada1.discourse-cdn.com/flex028/uploads/interopio/original/1X/2f284647adb27d07101d546eade0593d913a4e17.jpeg)._

## 2. Identify the script running during the delay

Select the `eventLoopBlocking` span and inspect its attributes. The example records:

| Attribute | Recorded value |
| --- | --- |
| `scriptFunctionName` | `buildSearchIndex` |
| `durationMs` | 9,164 ms |
| `scriptDurationMs` | 9,161 ms |
| `blockingDurationMs` | 9,114 ms |
| `isStartup` | `true` |
| `scriptInvoker` | `HTMLDocument.onDOMContentLoaded` |
| `scriptSourceURL` | `…/pre-init-test/script.js` (demo application) |
| `measurement` | `long-animation-frame` |

[![Event-loop blocking span details identifying buildSearchIndex, its script duration and blocking duration during startup.](https://canada1.discourse-cdn.com/flex028/uploads/interopio/original/1X/b5c4692f3c30d3433bed471285b4b9969ff26f20.png)](https://canada1.discourse-cdn.com/flex028/uploads/interopio/original/1X/2f284647adb27d07101d546eade0593d913a4e17.jpeg)

_[View the full screenshot](https://canada1.discourse-cdn.com/flex028/uploads/interopio/original/1X/2f284647adb27d07101d546eade0593d913a4e17.jpeg)._

Here, the long handler and the function details point to application code running during startup, rather than a long resource fetch. The header in the full screenshot shows a **12.0-second** trace.

## 3. Give the application team a concrete operation to investigate

Share the trace, function name, source script and timing with the application team. They need to review the functiont and whether it can be deffered in order to allow users to work during loading.

## Watch the example and read more

- [From Symptom to Root Cause: Tracking Issues with io.Insights Traces — recording and Q&A](https://community.interop.io/t/from-symptom-to-root-cause-io-insights-traces-recording-and-q-a/761): the application startup example begins around **20:32**.
- [io.Insights auto instrumentation](https://docs.interop.io/insights/configuration/io-connect-desktop/index.html#traces-auto_instrumentation): startup, resource and event-loop instrumentation settings.
- [io.Insights Desktop configuration](https://docs.interop.io/insights/configuration/io-connect-desktop/index.html): trace collection and span filters.
