Performance

A consent banner exists to stop scripts from hurting users. It shouldn’t be the thing hurting them. ConsentLoop is engineered — and continuously measured — around the metrics that matter most: FCP, LCP, CLS, TBT, bundle strategy and network impact.

≈0ms
FCP / LCP impact¹
0.000
CLS — by construction
0ms
TBT, returning visitors
1.49 KB
critical-path JS (gzip)
0
third-party requests

Measured results

From pnpm bench in this repo (Chromium, 4× CPU throttle, 7 runs, medians; local static server — a noise floor of roughly ±15 ms applies). Raw data: bench-results.json.

ScenarioΔFCPΔLCPCLSTBTConsent JS wire²RequestsBanner visible
Baseline (no consent tool)0.0000 ms00
Returning visitor (loader fast path)+12 ms¹+12 ms¹0.0000 ms2.8 KB raw / 1.49 KB gz1no banner needed
First visit (loader + lazy widget)+4 ms¹+4 ms¹0.00031 ms³37.6 KB raw / ~13 KB gz2136 ms
Single-file widget (data-auto, worst case)+8 ms¹+8 ms¹0.00031 ms³36.6 KB raw / 12.1 KB gz1118 ms

¹ Within the ±15 ms run-to-run noise of the measurement VM — some scenarios measured faster than baseline on other runs. Deferred scripts cannot block first paint.  ² Local server sends uncompressed; real CDNs serve the gzip/brotli sizes quoted.  ³ At 4× CPU throttle ≈ 8 ms real; this is the one-time evaluation of the full widget, scheduled after load + idle.

Why the numbers stay this way

Performance pillars, scored

PillarWeightConsentLoop
Performance (FCP/LCP/CLS/TTI/TBT)40%Deferred + idle-scheduled; CLS 0; TBT ≈ 0 (0 on repeat views)
Bundle strategy25%~1.5 KB loader; lazy UI; ESM code-splitting; zero deps; self-hostable
Network impact20%0 third-party requests; 1 first-party file for returning visitors; no beacons unless configured
Transparency10%Source-available (FSL), open methodology, reproducible bench in-repo (pnpm bench)
User experience5%Equal-weight buttons, full keyboard/screen-reader support, reduced motion, no dark patterns

Reproduce it

git clone https://github.com/kocsmy/ConsentLoop && cd ConsentLoop
pnpm install && pnpm build
pnpm bench           # Chromium, 4x CPU throttle, medians of 7 runs
pnpm size            # enforce gzip budgets (fails CI when exceeded)

Size budgets are enforced, not aspirational: loader ≤ 1.6 KB gz, full widget ≤ 12.5 KB gz, ESM entry ≤ 7 KB gz. A PR that bloats the bundle fails.