Diagnose a slow button click caused by a large context update with io.Insights

A slow button click can be caused by the work it triggers and with io.Insights, you can follow the interaction through a Click Stream trace and inspect the cause, duration and payload size of the operations involved. Below we show how to trace a roughly two-second delay to a context update carrying about 80.8 MB of data.

Pre-requisites

  • An io.Connect Desktop environment with io.Insights enabled and traces being collected.
  • Click Stream tracing enabled for the web app, with the relevant context-operation spans retained by your trace filters. Click Stream is disabled by default; see Desktop trace configuration.

1. Find the click that triggered the delay

Open the affected application’s Click Stream trace for the reported interaction. Expand the click and its event listeners to follow the operations triggered by the button.

Click Stream trace expanded from the button click to a listener containing the 1.95-second context update.

View the full screenshot.

2. Inspect the context update’s attributes

Select module.update and inspect the span details. Here’s the revealing info:

Detail Recorded value
Duration 1.95 seconds
context insights.demo.Positions
bytes 80,812,330 (about 80.8 MB)
keys 12,000

Context update details showing the 1.95-second duration and the bytes, context and keys attributes.

The large context (80mb) update is the cause of the delay in this example.

3. Review the data-sharing operation

Share the trace, context name, duration and payload size with the application team. The question is whether that interaction needs to send this much data through a shared context or there’s a more efficient way to handle it. After changing the application, repeat the interaction and compare the update duration and payload size with the original trace.

Find more