‹ flashbang bench

Validated Service Worker fetch round-trip latency across redirect paths

Configuration

Keep only one benchmark page open at a time so Service Worker isolation remains active for this tab.

Methodology

Redirect paths and a Service Worker no-op baseline are measured in randomized, interleaved order using fetch('/?q=...', { redirect: 'manual' }) which stops at the Service Worker’s 302 redirect response without following it. This is a client-to-worker fetch round trip, not a top-level navigation measurement. The no-op row exposes transport and scheduling overhead separately from redirect processing.

A small popup also runs up to 100 paired top-level navigations. Each pair compares a direct same-origin target with the real parser and 302 path to that same target. Their difference estimates redirect overhead while excluding destination network time.

  • 50 warmup iterations per path (discarded), interleaved with all other paths
  • 500 measured iterations by default (configurable 100–5,000)
  • cross-origin-isolated timing is required before any samples are accepted
  • Validated benchmark mode uses deterministic settings, prevents persistence changes, and verifies that the worker handled every request
  • Stats computed: median, mean, p95, median absolute deviation, median 95% confidence interval, min, max

Run with DevTools closed — Chrome adds huge instrumentation overhead to Service Worker timing. The maximum is sensitive to browser scheduling and GC pauses; use the median and percentiles for comparisons.