Skip to content

pauseDuration is 0 while synchronous dialogs are shown #17

@rviscomi

Description

@rviscomi

According to MDN, pauseDuration represents:

the total time, in milliseconds, spent by the script on "pausing" synchronous operations (for example, Window.alert() calls or synchronous XMLHttpRequests)

However, script entries have a pauseDuration of 0, even while an alert is open.

Example LoAF entry
{
    "name": "long-animation-frame",
    "entryType": "long-animation-frame",
    "startTime": 4816.9000000059605,
    "duration": 4081,
    "navigationId": "ddfd6f3a-9257-457e-99ff-b67f267b1c31",
    "renderStart": 8898.40000000596,
    "styleAndLayoutStart": 8898.5,
    "firstUIEventTimestamp": 4878.700000017881,
    "blockingDuration": 3967,
    "scripts": [
        {
            "name": "script",
            "entryType": "script",
            "startTime": 4831.5,
            "duration": 302,
            "navigationId": "ddfd6f3a-9257-457e-99ff-b67f267b1c31",
            "invoker": "TimerHandler:setTimeout",
            "invokerType": "user-callback",
            "windowAttribution": "self",
            "executionStart": 4831.5,
            "forcedStyleAndLayoutDuration": 0,
            "pauseDuration": 0,
            "sourceURL": "https://inp-demo-dialog.glitch.me/main.js",
            "sourceFunctionName": "periodicBlock",
            "sourceCharPosition": 1403
        },
        {
            "name": "script",
            "entryType": "script",
            "startTime": 5134.700000017881,
            "duration": 3763,
            "navigationId": "ddfd6f3a-9257-457e-99ff-b67f267b1c31",
            "invoker": "BUTTON.onclick",
            "invokerType": "event-listener",
            "windowAttribution": "self",
            "executionStart": 5134.700000017881,
            "forcedStyleAndLayoutDuration": 0,
            "pauseDuration": 0,
            "sourceURL": "https://inp-demo-dialog.glitch.me/",
            "sourceFunctionName": "onclick",
            "sourceCharPosition": 0
        }
    ]
}

Example trace: https://trace.cafe/t/GBb9saklW7

To reproduce:

  1. Open DevTools and go to https://inp-demo-dialog.glitch.me/
  2. Set blocking frequency to "Often"
  3. Trigger an alert
  4. Inspect the LoAF entry in the console

(You may need to try again if your interaction was < 50ms)

loaf-pause-duration.mov

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions