Key Points:
- Microsoft is proposing a new feature called the Delayed Message Timing API to help web developers improve web performance by identifying and diagnosing delays in cross-context messaging.
- The API aims to provide detailed information about the causes of delays, including blockedDuration, taskCount, and serialization and deserialization times.
- The Delayed Message Timing API will work with various contexts, including windows, tabs, iframes, and workers, and will cover different types of messaging, such as cross-document messaging and channel messaging.
Microsoft is working to improve web performance, and one area of focus is on reducing delays in cross-context messaging. Complex web applications often rely on multiple windows, iframes, or worker threads, which can introduce slowdowns. To address this issue, Microsoft is proposing the Delayed Message Timing API, a new feature that will help web developers identify and diagnose delays in cross-context messaging.
Delays can occur when an app exchanges messages between its various contexts, such as the app’s main window, worker threads, or iframes. If these messages get queued and are not processed promptly, delays can occur, degrading the user experience. The Delayed Message Timing API aims to provide detailed information about the causes of these delays, including the time a message was blocked, the number of tasks blocking the message, and the time needed to serialize and deserialize the message.
There are three types of delays that can occur when exchanging messages between contexts: slowdowns due to a busy receiving context, congested task queues, and serialization and deserialization overhead. The Delayed Message Timing API introduces new properties, such as blockedDuration, taskCount, and serialization and deserialization times, to help diagnose these slowdowns.
The API will work with various contexts, including windows, tabs, iframes, and workers, and will cover different types of messaging, such as cross-document messaging and channel messaging. To use the API, web developers will need to create a PerformanceObserver instance and observe "delayed-message" Performance entries. The API will provide detailed information about the message-passing event, including the type of message, the timestamp for when the message was added to the task queue, and the time the message spent waiting in the receiver’s task queue.
Microsoft is seeking feedback on the Delayed Message Timing API proposal and encourages web developers to share their experiences and suggestions. The API is in its early stages, and Microsoft wants to ensure that it meets the needs of web developers. To provide feedback, web developers can open a new issue on the MSEdgeExplainers repo.
The Delayed Message Timing API has the potential to significantly improve web performance by providing web developers with the tools they need to identify and diagnose delays in cross-context messaging. With this API, web developers will be able to optimize their web applications, reducing delays and improving the overall user experience. As Microsoft continues to work on the Delayed Message Timing API, web developers can expect to see improvements in web performance, making the web a faster and more responsive place.
Read the rest: Source Link
You might also like: Try AutoCAD 2026 for Windows, best free FTP Clients on Windows & browse the best Surface Laptops to buy.
Remember to like our facebook and our twitter @WindowsMode for a chance to win a free Surface every month.
