v153 · loaf in workers

Blocking a worker on purpose

A real worker, a real busy loop, and three witnesses asked afterwards what they saw. The main thread keeps sending pings throughout, so the stall is measurable from outside even when nothing inside the worker can report it.

Worker entries need a launch flag. LongAnimationFrameWorker has status "test" in Chromium's runtime_enabled_features.json5 (Chrome 153 through current main), so there is no chrome://flags entry and --enable-experimental-web-platform-features does not turn it on. Relaunch Chrome or Canary with --enable-blink-features=LongAnimationFrameWorker. Even then, Chromium reports a worker entry only for a congested moment: a task was already waiting while another ran, the backlog lasted at least 200ms, and the worker then went idle for more than 5ms (animation_frame_timing_monitor.cc). A long task with nothing queued behind it produces no entry.

Jam the worker

the worker's own PerformanceObserver

—

Not run yet.

the main thread's observer

—

Not run yet.

a round-trip ping

—

Not run yet.

Ping log


    Press the button.
    

The page stays responsive throughout — the block is in the worker, not here. That is exactly what makes it hard to find: nothing janks, a message is simply late, and by the time you notice, the worker has moved on.

What the ping can and cannot tell you

A round trip that takes 400ms instead of 1ms proves the worker was busy. It does not say for how long, exactly — the ping was sent at some point during the block and answered at the end of it — and it says nothing at all about what the worker was doing. In production you do not get to send pings during the stall you are trying to diagnose; you get a report from a user's machine, after the fact.

That is the difference an entry makes. A long-animation-frame entry inside the worker carries the duration, the blocking duration, and the scripts responsible with their source URLs and character positions — a stack trace's worth of attribution, recorded without anyone having to be watching at the time.

see also