Skip to content

Authentication Engine Benchmarks ​

This page documents the empirical benchmarks conducted to evaluate migrating LazyTeams' default authentication engine in v0.2.0 from Playwright (Firefox) to chromedp (direct Go CDP) while retaining Playwright as an opt-in backend.

Three engine/browser configurations were measured under identical conditions:

  1. playwright-firefox (v0.1.6 baseline): playwright-go + Node.js driver + Playwright-bundled Firefox.
  2. playwright-chrome: playwright-go + Node.js driver + system-installed Google Chrome (intermediate control separating browser vs. driver impact).
  3. chromedp-chrome (v0.2.0 default): chromedp (pure Go CDP, no external driver) + system-installed Google Chrome.

Summary & Key Findings ​

All Level B values below are medians from successful live Microsoft headless renewals (N = 3 for Chrome engines, n = 2 for playwright-firefox after excluding one failed run reported separately):

Metricplaywright-firefox (v0.1.6)playwright-chromechromedp-chrome (v0.2.0)Total Savings (chromedp vs. v0.1.6)
Warm startup — Level A offline (ms)3,1031,610741-2,362 ms (4.2× faster)
Warm startup — Level B live (ms)2,5611,407501-2,060 ms (5.1× faster)
Full headless renewal — Level A offline (ms)5,1433,0441,966-3,177 ms (2.6× faster)
Full headless renewal — Level B live (ms)70,624 (n = 2)38,593 (n = 3)35,917 (n = 3)-34,707 ms (-49.1%, ~2.0×)
Graceful shutdown — Level B live (ms)2,672132119-2,553 ms (22× faster)
Physical memory Peak PSS — Level A (MiB)567.2619.3475.0-92.2 MiB (-16.3%)
Physical memory Peak PSS — Level B (MiB)2,653.4 (n = 2)1,673.3 (n = 3)1,512.3 (n = 3)-1,141.1 MiB (-43.0%, -1.11 GiB)
Headless renewal pass rate — Level B2/33/33/3(N = 3; see Limitations)
Extra disk footprint (Chrome already installed)427.1 MiB130.0 MiB0 B-427.1 MiB
External Node.js driver / runtime JS patchesYes / YesYes / Driver-dependentNo / NoEliminated

Test Environment & Methodology ​

Software Environment ​

ComponentMeasured Version
Operating systemArch Linux (x86_64)
System Chromium browserGoogle Chrome 151.0.7922.173 (/usr/bin/google-chrome-stable)
Playwright FirefoxMozilla Firefox 151.0 (firefox-1532)
Playwright driverms-playwright-go 1.61.1 (bundled Node.js + coreBundle.js patch as in v0.1.6)
Playwright Go librarygithub.com/mxschmitt/playwright-go v0.6100.0
CDP Go librarygithub.com/chromedp/chromedp v0.24.0 + github.com/chromedp/cdproto v0.160.1

Measurement Rules ​

  • Strict separation of evidence sources:
    • Level A (controlled offline synthetic loopback): isolates pure driver, IPC, and browser overhead with zero external network latency.
    • Level B (controlled live Microsoft): same institutional account, same network, independent isolated 0700 profiles against live Microsoft Teams, Education Assignments OOPIF, and Graph Explorer.
  • Timing boundaries: t = 0 starts immediately before driver/engine startup (playwright.Run() or CDP session open) and ends after all credential validations (HTTP 200 read-only GET checks against chatsvc, 48:notifications, and assignments.edu.cloud.microsoft, plus Graph JWT/scope/audience/(oid, tid) validation) and graceful browser shutdown (close_ms also reported separately).
  • Memory & process attribution: sampled every 30 ms via Linux /proc across the full child process tree, benchmark environment tag, and temporary --user-data-dir. Both Peak PSS (/proc/<pid>/smaps_rollup, proportional physical memory avoiding shared-page double counting) and Peak Summed RSS are reported. Orphan processes are checked 250 ms after shutdown.
  • Strict exclusion of human time and failures: in Level B Phase 1 (visible cold sign-in), human login/MFA and interactive Graph time are tracked separately and never mixed into headless renewal statistics. Failed headless runs are excluded from success medians/ranges and documented separately.
  • Security scope: strictly read-only GET validations, Fabric Stage 7B excluded (fabric_captured: false), zero tokens/cookies/emails written to reports or logs.

Level A — Controlled Offline Benchmark (Synthetic) ​

Measured against a two-origin local loopback fixture (127.0.0.1 + localhost) featuring a Dedicated Web Worker, cross-origin EDU iframe (OOPIF), HttpOnly cookies, and a localized Entra account picker popup. Values are formatted as median (min–max).

Headless Startup (Cold & Warm, N = 5) ​

Metricplaywright-firefox (v0.1.6)playwright-chromechromedp-chrome (v0.2.0)
Cold — Node driver startup (ms)1,194 (1,105–1,345)1,263 (1,183–1,369)0
Cold — Browser launch (ms)2,520 (2,488–3,113)358 (340–418)837 (726–1,061)
Cold — Total startup (ms)3,797 (3,593–4,307)1,603 (1,545–1,788)837 (726–1,061)
Cold — Graceful shutdown (ms)1,012 (897–1,185)122 (115–151)77 (73–82)
Cold — Peak PSS (MiB)529.7 (525.7–543.0)421.4 (421.0–427.0)315.9 (314.3–317.8)
Warm — Node driver startup (ms)1,232 (1,153–1,286)1,257 (1,163–1,323)0
Warm — Total startup (ms)3,103 (2,584–3,547)1,610 (1,501–1,676)741 (609–855)
Warm — Graceful shutdown (ms)276 (228–559)116 (106–122)79 (68–80)
Warm — Persisted HttpOnly cookie5/55/55/5
Warm — Peak PSS (MiB)518.1 (510.8–522.3)449.8 (443.6–452.0)323.2 (307.4–331.5)
Residual processes after shutdown0/100/100/10

Full Synthetic Headless Renewal (Warm Profile, N = 3) ​

Metric (Level A — synthetic)playwright-firefox (n = 3)playwright-chrome (n = 3)chromedp-chrome (n = 3)
Node driver startup (ms)1,221 (1,175–1,271)1,181 (1,128–1,184)0
Browser startup (ms)2,964 (2,826–3,095)1,537 (1,465–1,730)907 (810–916)
1st valid credential (spaces, ms)3,197 (3,034–3,349)1,739 (1,672–1,949)1,078 (980–1,087)
TEAMS_WEB_TOKEN / NOTIF (ms)3,389 (3,264–3,596)1,908 (1,837–2,097)1,201 (1,110–1,213)
TEAMS_COOKIE (ms)3,413 (3,279–3,603)1,915 (1,864–2,104)1,208 (1,116–1,219)
EDU_TOKEN (OOPIF + HTTP 200, ms)3,902 (3,679–4,078)2,246 (2,245–2,451)1,501 (1,410–1,572)
MS_GRAPH_TOKEN (popup + HTTP 200, ms)4,964 (4,859–5,457)2,953 (2,934–3,169)1,868 (1,827–1,924)
Graceful shutdown (ms)230 (178–439)110 (85–118)96 (78–115)
Total synthetic renewal (ms)5,143 (5,090–5,897)3,044 (3,039–3,287)1,966 (1,906–2,040)
Post-startup work (total - startup, ms)2,317 (2,126–2,802)1,507 (1,309–1,822)1,096 (1,059–1,124)
Physical memory Peak PSS (MiB)567.2 (566.2–568.5)619.3 (617.0–630.6)475.0 (467.5–485.8)
Peak summed RSS (MiB)1,002.0 (1,001.1–1,004.3)1,376.9 (1,349.8–1,377.0)1,278.4 (1,261.2–1,357.1)
Peak helper processes / residuals8–9 / 015 / 016 (no Node) / 0
Errors in measured runs (N = 3)00 (1 popup_not_clicked in prior cold warmup)0

Disk Footprint, Dependencies & Binary Size ​

Dimensionplaywright-firefoxplaywright-chromechromedp-chrome
Extra cache/downloads (system Chrome installed)427.1 MiB (130.0 Node + 292.2 Firefox + 4.9 ffmpeg)130.0 MiB (Node driver)0 B
External runtime processNode.js + FirefoxNode.js + ChromeNone (installed browser only)
Runtime JS driver patchesYes (patchDriverBundle on coreBundle.js)Dependent on coreBundle.js/Node driverNone
Go engine dependenciesplaywright-go + transitive modulesSame3 modules (chromedp, cdproto, go-json-experiment/json)
Compiled lazyteams-auth size12.92 MiB~12.92 MiBchromedp-only: 12.26 MiB; Dual (chromedp + playwright): 13.68 MiB (+0.8–1.5 MiB)

Level B — Live Microsoft Benchmark ​

Measured against live Microsoft Teams, Education Assignments (assignments.edu.cloud.microsoft, edu_cookie_required=false), and Graph Explorer with isolated 0700 profiles. All credentials passed live HTTP 200 / Graph contract + (oid, tid) verification, with 0 Fabric tokens observed or captured.

Phase B2 — Successful Automatic Headless Renewals ​

Methodological note: playwright-firefox passed 2/3 headless renewals; failed run #3 is excluded from all medians/ranges below and reported separately in the next section. Both Chrome engines passed 3/3.

Metric (Level B — successful renewals only)playwright-firefox (2/3 PASS; n = 2)playwright-chrome (3/3 PASS; n = 3)chromedp-chrome (3/3 PASS; n = 3)
Headless renewal pass rate2/3 (66.7%)3/3 (100%)3/3 (100%)
Node.js driver startup (ms)1,092 (1,045–1,139)1,067 (1,030–1,116)0 (0–0)
Browser startup (ms)2,561 (2,445–2,677)1,407 (1,367–1,475)501 (489–915)
1st valid credential (spaces, ms)8,679 (8,541–8,817)8,293 (7,776–10,528)8,743 (7,916–11,048)
TEAMS_WEB_TOKEN (ms, HTTP 200)24,658 (24,582–24,733)16,272 (15,197–18,754)13,377 (12,461–15,686)
TEAMS_NOTIF_TOKEN (ms, HTTP 200)41,966 (40,631–43,301)30,470 (29,539–32,527)27,592 (26,883–30,353)
TEAMS_COOKIE (ms; cookie count)41,708 (41,438–41,978; 44–45)30,552 (29,614–32,907; 50)28,395 (27,686–31,155; 48–49)
EDU_TOKEN (ms, HTTP 200)56,358 (56,109–56,606)33,943 (32,382–38,608)30,408 (29,848–33,248)
MS_GRAPH_TOKEN (ms, validated + oid/tid)66,481 (66,410–66,551)37,348 (36,753–42,968)33,603 (32,057–36,261)
EDU stage delta (edu - cookie, ms)14,650 (14,131–15,168)3,391 (2,768–5,701)2,093 (2,013–2,162)
Graph stage delta (graph - edu, ms)10,123 (9,804–10,442)4,360 (3,405–4,371)3,013 (2,209–3,195)
Graph Explorer outcome (Phase 2)popup_account_selected (matches=1, run_query=true)already_signed_in (0 popups)already_signed_in (0 popups)
Total full renewal (ms)70,624 (70,547–70,701)38,593 (38,200–44,442)35,917 (34,383–38,982)
Post-startup work (total - startup, ms)68,063 (68,024–68,102)37,186 (36,833–42,967)35,428 (33,882–38,067)
Graceful shutdown (close_ms, ms)2,672 (2,553–2,790)132 (130–135)119 (110–211)
Physical memory Peak PSS (MiB)2,653.4 (2,618.3–2,688.5)1,673.3 (1,660.4–1,690.7)1,512.3 (1,458.9–1,526.8)
Peak summed RSS (MiB)3,131.7 (3,100.2–3,163.1)3,160.3 (3,062.5–3,173.8)3,024.2 (2,967.5–3,040.5)
Peak helper processes / residuals8–9 (incl. Node) / 020–21 (incl. Node) / 021 (no Node) / 0
HTTP / oid+tid validations / errors200/200/200, oid/tid=true, 0 err200/200/200, oid/tid=true, 0 err200/200/200, oid/tid=true, 0 err

All three engines shared the same fixed wait (up to 12 s) on /v2/ before probing 48:notifications.

Recorded Failure in Level B (Reported Separately) ​

EnginePhase / RunStatusCredentials Captured Before FailureSanitized Graph DiagnosticTotal Duration / Peak PSS / Residuals
playwright-firefoxPhase 2, run #3FAIL (BLOCKED_INTERACTION_REQUIRED)spaces (9,312 ms), web (26,069 ms, HTTP 200), notif (41,593 ms, HTTP 200), cookie (42,395 ms, 46 cookies), edu (57,461 ms, HTTP 200)stage_status=BLOCKED_INTERACTION_REQUIRED, requests_seen=0, sign_in_outcome=interaction_required, account_matches=0, run_query_clicked=false64,931 ms / 2,443.2 MiB / 0 residuals

Both successful playwright-firefox runs also required reopening the Entra popup (popup_account_selected), whereas both Chrome engines stayed signed in to Graph Explorer (already_signed_in, 0 popups) across 3/3 runs. On run #3, Graph Explorer required interaction and the harness exited fail-closed with zero leaked processes.

Phase B1 — Cold Visible First Sign-In (n = 1 per engine) ​

Human login/MFA time is separated from automated capture time:

Metric (Phase B1 — cold visible capture)playwright-firefoxplaywright-chromechromedp-chrome
Overall result (all_valid_pass)PASS (0 err)PASS (0 err)PASS (0 err)
Node driver / Visible startup (ms)1,010 / 4,2761,068 / 1,6410 / 805
Human time — Teams login/MFA (ms) (excluded from net)18,54020,29124,944
Human time — Graph Explorer (ms) (excluded from net)12,008 (manual click required)0 (automatic)0 (automatic)
Total manual interventions2 (Teams + Graph)1 (Teams only)1 (Teams only)
Graph Explorer outcome (Phase 1)interactive_completed (matches=0)popup_account_selected (matches=1, run_query=true)popup_account_selected (matches=1, run_query=true)
Total wall-clock time (incl. human, ms)107,30683,17981,375
Net automated time (wall - human, ms)76,75862,88856,431
Graceful shutdown (ms)7881,7252,023
Physical memory Peak PSS (MiB)1,983.31,908.41,762.6
Peak helper processes / residuals15 / 018 / 020 (no Node) / 0

Causal Attribution: Browser vs. Engine ​

Including playwright-chrome as an intermediate control isolates how much of the gain comes from switching browsers versus switching automation engines:

FactorLevel B Time Improvement (Median)Share of Total Time SavedLevel B Peak PSS Improvement (Median)Share of Total RAM SavedAdditional Impact
1. Browser switch: Firefox → Chrome (playwright-firefox → playwright-chrome, same Node driver)-32,031 ms (70.6 s → 38.6 s)92.3%-980.1 MiB (2,653 → 1,673 MiB)85.9%Startup -1.15 s; Teams Web -8.4 s; Assignments OOPIF -11.2 s; Graph already_signed_in with 0 popups (-5.7 s); shutdown -2.54 s.
2. Engine switch: Playwright/Node → chromedp Go (playwright-chrome → chromedp-chrome, same Chrome 151)-2,676 ms (38.6 s → 35.9 s)7.7%-161.0 MiB (1,673 → 1,512 MiB)14.1%Removes ~1.07 s Node startup + ~1.6 s IPC/interception overhead; startup 2.8× faster (501 ms vs. 1,407 ms); eliminates 130–427 MiB disk cache, external Node process, and coreBundle.js patching.
3. Live Microsoft Teams / Assignments / Graph latency~35.4 s shared baseline (post-startup in chromedp)Dominates live wall time~1.5 GiB PSS Teams 2.0 SPA baselineDominates live RAMExplains why chromedp's relative speedup over playwright-chrome shifts from 1.55× in offline Level A to 1.07× (-6.9%) in live Level B.

Limitations & Known Biases ​

  1. Small live sample size (N = 3 headless runs per engine in Level B): sufficient to confirm large, consistent differences in renewal time (70.6 s vs. 35.9 s) and Peak PSS (2.65 GiB vs. 1.51 GiB), but not large enough to claim statistical significance in reliability (3/3 vs. 2/3 is a single observed failure).
  2. Single measured platform: benchmarks were run on Arch Linux (x86_64) with Google Chrome 151. Chromium distro packages, Microsoft Edge, Brave, macOS, and Windows have not yet been benchmarked live.
  3. Shared 12 s wait on /v2/: identical across all three engines before probing 48:notifications; it does not bias relative comparisons, but leaves room for future absolute latency optimization.
  4. Linux keyring behavior: chromedp uses --password-store=basic inside the owner-only 0700 profile directory on Linux to prevent OSCrypt v11 headless cookie loss when a desktop keyring is locked (see Security).
  5. Post-benchmark daily use (separate from controlled benchmark): prior to releasing v0.2.0, the chromedp default engine completed 3–4 consecutive days of daily Linux usage with automatic background renewals succeeding without manual helper intervention or orphaned processes.

References ​