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:
playwright-firefox(v0.1.6baseline):playwright-go+ Node.js driver + Playwright-bundled Firefox.playwright-chrome:playwright-go+ Node.js driver + system-installed Google Chrome (intermediate control separating browser vs. driver impact).chromedp-chrome(v0.2.0default):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):
| Metric | playwright-firefox (v0.1.6) | playwright-chrome | chromedp-chrome (v0.2.0) | Total Savings (chromedp vs. v0.1.6) |
|---|---|---|---|---|
Warm startup — Level A offline (ms) | 3,103 | 1,610 | 741 | -2,362 ms (4.2× faster) |
Warm startup — Level B live (ms) | 2,561 | 1,407 | 501 | -2,060 ms (5.1× faster) |
Full headless renewal — Level A offline (ms) | 5,143 | 3,044 | 1,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,672 | 132 | 119 | -2,553 ms (22× faster) |
Physical memory Peak PSS — Level A (MiB) | 567.2 | 619.3 | 475.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 B | 2/3 | 3/3 | 3/3 | (N = 3; see Limitations) |
| Extra disk footprint (Chrome already installed) | 427.1 MiB | 130.0 MiB | 0 B | -427.1 MiB |
| External Node.js driver / runtime JS patches | Yes / Yes | Yes / Driver-dependent | No / No | Eliminated |
Test Environment & Methodology
Software Environment
| Component | Measured Version |
|---|---|
| Operating system | Arch Linux (x86_64) |
| System Chromium browser | Google Chrome 151.0.7922.173 (/usr/bin/google-chrome-stable) |
| Playwright Firefox | Mozilla Firefox 151.0 (firefox-1532) |
| Playwright driver | ms-playwright-go 1.61.1 (bundled Node.js + coreBundle.js patch as in v0.1.6) |
| Playwright Go library | github.com/mxschmitt/playwright-go v0.6100.0 |
| CDP Go library | github.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
0700profiles against live Microsoft Teams, Education Assignments OOPIF, and Graph Explorer.
- Timing boundaries:
t = 0starts immediately before driver/engine startup (playwright.Run()or CDP session open) and ends after all credential validations (HTTP 200read-onlyGETchecks againstchatsvc,48:notifications, andassignments.edu.cloud.microsoft, plus Graph JWT/scope/audience/(oid, tid)validation) and graceful browser shutdown (close_msalso reported separately). - Memory & process attribution: sampled every
30 msvia Linux/procacross the full child process tree, benchmark environment tag, and temporary--user-data-dir. BothPeak PSS(/proc/<pid>/smaps_rollup, proportional physical memory avoiding shared-page double counting) andPeak Summed RSSare reported. Orphan processes are checked250 msafter 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
GETvalidations, 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)
| Metric | playwright-firefox (v0.1.6) | playwright-chrome | chromedp-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 cookie | 5/5 | 5/5 | 5/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 shutdown | 0/10 | 0/10 | 0/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 / residuals | 8–9 / 0 | 15 / 0 | 16 (no Node) / 0 |
Errors in measured runs (N = 3) | 0 | 0 (1 popup_not_clicked in prior cold warmup) | 0 |
Disk Footprint, Dependencies & Binary Size
| Dimension | playwright-firefox | playwright-chrome | chromedp-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 process | Node.js + Firefox | Node.js + Chrome | None (installed browser only) |
| Runtime JS driver patches | Yes (patchDriverBundle on coreBundle.js) | Dependent on coreBundle.js/Node driver | None |
| Go engine dependencies | playwright-go + transitive modules | Same | 3 modules (chromedp, cdproto, go-json-experiment/json) |
Compiled lazyteams-auth size | 12.92 MiB | ~12.92 MiB | chromedp-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-firefoxpassed2/3headless renewals; failed run #3 is excluded from all medians/ranges below and reported separately in the next section. Both Chrome engines passed3/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 rate | 2/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 / residuals | 8–9 (incl. Node) / 0 | 20–21 (incl. Node) / 0 | 21 (no Node) / 0 |
HTTP / oid+tid validations / errors | 200/200/200, oid/tid=true, 0 err | 200/200/200, oid/tid=true, 0 err | 200/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)
| Engine | Phase / Run | Status | Credentials Captured Before Failure | Sanitized Graph Diagnostic | Total Duration / Peak PSS / Residuals |
|---|---|---|---|---|---|
playwright-firefox | Phase 2, run #3 | FAIL (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=false | 64,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-firefox | playwright-chrome | chromedp-chrome |
|---|---|---|---|
Overall result (all_valid_pass) | PASS (0 err) | PASS (0 err) | PASS (0 err) |
Node driver / Visible startup (ms) | 1,010 / 4,276 | 1,068 / 1,641 | 0 / 805 |
Human time — Teams login/MFA (ms) (excluded from net) | 18,540 | 20,291 | 24,944 |
Human time — Graph Explorer (ms) (excluded from net) | 12,008 (manual click required) | 0 (automatic) | 0 (automatic) |
| Total manual interventions | 2 (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,306 | 83,179 | 81,375 |
Net automated time (wall - human, ms) | 76,758 | 62,888 | 56,431 |
Graceful shutdown (ms) | 788 | 1,725 | 2,023 |
Physical memory Peak PSS (MiB) | 1,983.3 | 1,908.4 | 1,762.6 |
| Peak helper processes / residuals | 15 / 0 | 18 / 0 | 20 (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:
| Factor | Level B Time Improvement (Median) | Share of Total Time Saved | Level B Peak PSS Improvement (Median) | Share of Total RAM Saved | Additional 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 baseline | Dominates live RAM | Explains 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
- Small live sample size (
N = 3headless runs per engine in Level B): sufficient to confirm large, consistent differences in renewal time (70.6 svs.35.9 s) andPeak PSS(2.65 GiBvs.1.51 GiB), but not large enough to claim statistical significance in reliability (3/3vs.2/3is a single observed failure). - Single measured platform: benchmarks were run on Arch Linux (
x86_64) with Google Chrome151. Chromium distro packages, Microsoft Edge, Brave, macOS, and Windows have not yet been benchmarked live. - Shared
12 swait on/v2/: identical across all three engines before probing48:notifications; it does not bias relative comparisons, but leaves room for future absolute latency optimization. - Linux keyring behavior:
chromedpuses--password-store=basicinside the owner-only0700profile directory on Linux to prevent OSCrypt v11 headless cookie loss when a desktop keyring is locked (see Security). - Post-benchmark daily use (separate from controlled benchmark): prior to releasing
v0.2.0, thechromedpdefault engine completed 3–4 consecutive days of daily Linux usage with automatic background renewals succeeding without manual helper intervention or orphaned processes.