← Back to release summary

Delayed Message Timing API

Category
Performance
Type
New or changed feature
Status
Proposed (Chrome Proposed)
Intent stage
None

Summary

Web applications frequently use the postMessage API for communication across different execution contexts, such as between windows, iframes, and web workers. However, message delays often occur when messages are queued but not processed promptly. These delays can degrade the user experience by making applications feel unresponsive. While developers can detect that a delay happened, identifying the specific cause—whether it's a busy thread, a congested message queue, or serialization/deserialization overhead—is challenging with current tools. The Delayed Message Timing API will provide developers with end-to-end timing metrics and details on blocking tasks, allowing them to pinpoint the root causes of these delays and improve application performance.

Motivation

The web needs the Delayed Message Timing API because web applications frequently use postMessage, but the resulting message delays can significantly degrade user experience. While developers can currently detect these delays, they lack the tools to accurately diagnose their root cause. Delays can stem from a variety of sources, including a receiver's thread being busy with long tasks, congestion in the message queue, or serialization/deserialization overhead. Manually measuring these internal timings with existing tools is often imprecise and cumbersome. A dedicated API is therefore necessary to precisely measure and attribute these specific sources of delay. Without it, web developers face considerable challenges in identifying and resolving these critical performance issues, leading to a poorer experience for end-users.

Standards & signals

Ecosystem

Explainers: https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/DelayedMessages/explainer.md

View on chromestatus.com