Skip to content

chore(ui): measure concurrent-session responsiveness - #194892

Merged
steipete merged 18 commits into
mainfrom
solid2/w-perf-event-load-1107
Nov 8, 2026
Merged

steipete merged 18 commits into
mainfrom
solid2/w-perf-event-load-1107

Conversation

@steipete

@steipete steipete commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Control UI benchmarks previously covered quiet UI and one foreground reply, without measuring a tool-heavy turn alongside many active background sessions.

User Impact

Developers can now measure unloaded, foreground-only, and 5/20/100-background workloads with the existing cross-engine harness. No production UI behavior, protocol, dependency, or production size ceiling changes.

Why This Change Was Made

The fixture holds the inventory at 1,000 sessions and runs 200 foreground tools with live output. It measures native typing, scroll-frame gaps, session/route switching, idle renderer CPU where available, producer lag, and received wire frames/bytes. Actual application subscription calls govern detailed delivery. The shared mock now serves event/list/describe/history/mutation state from its canonical row owner, scopes subscription interests and row-delta baselines to each socket, and includes lastMessageAt in terminal deltas. A focused read-coalescing test counts its controlled burst from the existing settled boundary.

A real isolated Gateway grounded the event families and body-suppression rules: three concurrent agent runs, six actual read calls, nine loopback model requests. Full, narration, and broad-only audiences received respectively 48/41/14 frames and 59,131/55,036/18,976 JSON bytes. Broad-only durable receipts contained no message body. This is a small protocol observation, not a production-capacity measurement. The recurring stress rate—two logical durable receipts per second per background session—is synthetic; periodic usage invalidation was absent from the capture and is not invented in the mix.

A structural retained-section renderer candidate was removed after 20 rotated base/head/base triplets in each engine at desktop100. Chromium renderer CPU improved by paired median 10.8%, but Firefox session switching regressed by a paired median 30.3% and WebKit scroll-frame p95 by a paired median 8.9% (cell p95 +6.2%). A/A controls and all failed observations were retained. The cross-engine bar was not met, so this PR makes no production performance-improvement claim.

Evidence

The descriptive census uses the frozen application at 23f2cd68e9d38bbffe561bada8eab5a72b9af110, bundle SHA256 ba629719ce791ef32c151b84c8b63b5b7c8305d592fa6fb6bda078ca149adca8. It is not a measurement of subsequent main commits. All local browser runs were headless. Mobile means a mobile viewport on the same Mac, not physical mobile hardware; scroll gaps come from the scripted scroll loop, not touch/wheel delivery.

The completed baseline census contains 490 observations across 43 source/slot cells and 40 engine/viewport/throttle/load combinations: 476 passed, 14 failed, none incomplete. It includes 120 reused desktop100 baseline/control observations; the 60 rejected-candidate observations are excluded. Ingestion/contract audit found no issues. The full 20-triplet candidate experiment has 180 observations and remains a separate comparison.

Responsiveness is not established at 100 sessions. The foreground-only 200-tool turn already produces large frame gaps. At 1×, 100-background scroll-frame-p95 medians are about 133 ms in Chromium/Firefox and 194–212 ms in WebKit, versus roughly 17–25 ms unloaded. Firefox's whole-window producer averages reach only 61–87 of the nominal 200 logical receipts/s. At 4×, the producer falls short even at five backgrounds; at 100 it averages 63.24/200 on desktop and 145.47/200 on mobile. Completed 4×100 session switches have medians of 3.07/1.84 seconds (desktop/mobile, n=8 each), with cell p95 values of 12.28/13.30 seconds. Route-switch cell p95 reaches 17.57/32.45 seconds. Similar or lower frame-gap numbers under a missed offering are not evidence of improved scaling.

The 14 retained failures are six ResizeObserver errors, one foreground-production-overlap guard, three post-typing query timeouts, three session-switch wait timeouts, and one terminal-reply-visibility timeout. Post-typing screenshots show the expected draft intact, but the predicate timed out. Switch-timeout screenshots show the target transcript/checkpoints, but cannot establish which key/checkpoint predicate failed. Final correctness remains unverified for interrupted paths; no dropped final state is inferred. Available metrics remain in inclusive distributions, with missing metric counts preserved; passed-only distributions remain in the local detailed report.

Median scroll-frame p95 in ms, desktop / mobile. A range at desktop100 displays separate base/control medians, not a pooled estimate.

Background sessions Chromium 1× WebKit 1× Firefox 1× Chromium 4×
No load 16.7 / 16.7 24.5 / 19.5 17.2 / 18.5 50.1 / 50.1
0 133.4 / 133.4 131.5 / 88.0 133.3 / 125.7 383.3 / 358.3
5 150.0 / 133.4 124.5 / 126.5 175.6 / 118.4 366.6 / 350.0
20 133.4 / 133.3 138.0 / 101.5 134.5 / 117.8 366.6 / 333.3
100 133.4 / 133.3 207.0–212.0 / 194.0 132.9–133.3 / 134.2 266.7 / 250.0
Full timing matrix

Times are median / cell p95 in milliseconds. Input-to-frame is a compound native-input sequence, not isolated handler CPU. Scroll is each observation’s frame-gap p95. Counts are passed / observed; partial and failed observations retain available metrics. Desktop100 B/C are separate baseline/control slots from the 20-triplet experiment; they are not pooled.

Engine / viewport / throttle Backgrounds Pass / observed Input-to-frame p95 Scroll-frame p95 Session switch Route switch
chromium / desktop / 1× unloaded 10 / 10 15.9 / 18.4 16.7 / 16.8 128.8 / 156.1 331.15 / 337.3
chromium / desktop / 1× 0 10 / 10 14.3 / 16.5 133.4 / 149.9 129.95 / 152.2 332.5 / 338.2
chromium / desktop / 1× 5 10 / 10 14.45 / 35.7 150 / 166.7 254.55 / 282.3 374.5 / 457.1
chromium / desktop / 1× 20 10 / 10 13.8 / 16.2 133.4 / 150.1 256.95 / 267.3 344.25 / 387.5
chromium / desktop / 1× 100 B 20 / 20 12.55 / 15.9 133.4 / 133.4 331.1 / 405.8 386.3 / 459.9
chromium / desktop / 1× 100 C 20 / 20 13.55 / 16.4 133.4 / 133.4 365.45 / 544.8 392.35 / 451.2
chromium / desktop / 4× unloaded 10 / 10 16.4 / 19.4 50.1 / 66.7 554.55 / 802.8 560.6 / 617
chromium / desktop / 4× 0 9 / 10 56.9 / 62.6 383.3 / 450 (n=9) 546.7 / 716 (n=9) 437.5 / 614.3 (n=9)
chromium / desktop / 4× 5 10 / 10 58.7 / 67.7 366.65 / 400 1,526.5 / 3,535 2,980.3 / 4,089.6
chromium / desktop / 4× 20 10 / 10 54.3 / 61.5 366.6 / 383.4 2,246 / 8,979.9 4,352.25 / 5,081.6
chromium / desktop / 4× 100 8 / 10 26.9 / 29.8 266.7 / 266.7 3,067.2 / 12,275.3 (n=8) 917.2 / 17,569.5 (n=8)
chromium / mobile / 1× unloaded 10 / 10 15.25 / 16.8 16.7 / 16.8 635.6 / 642.7 762.9 / 786.7
chromium / mobile / 1× 0 10 / 10 12.5 / 177.4 133.4 / 133.4 644 / 667.5 759.6 / 808.5
chromium / mobile / 1× 5 10 / 10 12.05 / 15.7 133.4 / 133.4 639.3 / 655.9 808.95 / 828.8
chromium / mobile / 1× 20 10 / 10 13.25 / 14.7 133.3 / 133.4 655.3 / 707.2 833.2 / 842.8
chromium / mobile / 1× 100 10 / 10 10.55 / 13.7 133.3 / 133.4 714.1 / 754.6 905.8 / 1,015.7
chromium / mobile / 4× unloaded 10 / 10 16.6 / 19.2 50.1 / 66.6 1,204.65 / 1,309 1,182.75 / 1,237.6
chromium / mobile / 4× 0 9 / 10 39.25 / 48.3 358.3 / 549.9 1,226.05 / 1,437.8 1,189.15 / 1,363.5
chromium / mobile / 4× 5 10 / 10 35.4 / 41.5 350 / 433.4 2,085.15 / 2,884.5 6,807 / 8,008.7
chromium / mobile / 4× 20 9 / 10 34.45 / 38.1 333.3 / 350 (n=9) 3,154.4 / 4,533.4 (n=9) 8,484.9 / 10,525.3 (n=9)
chromium / mobile / 4× 100 8 / 10 26.8 / 28.6 250 / 250 (n=9) 1,835.75 / 13,304.7 (n=8) 1,559.4 / 32,445.1 (n=8)
firefox / desktop / 1× unloaded 10 / 10 3.5 / 6 17.16 / 17.46 228 / 240 371 / 387
firefox / desktop / 1× 0 10 / 10 118.5 / 336 133.34 / 332.92 178.5 / 197 435 / 470
firefox / desktop / 1× 5 10 / 10 128 / 565 175.56 / 565.68 535 / 1,806 618 / 1,139
firefox / desktop / 1× 20 9 / 10 114 / 139 134.48 / 333.14 1,126 / 1,806 (n=9) 483 / 596 (n=9)
firefox / desktop / 1× 100 B 20 / 20 95 / 125 132.9 / 200 1,932.5 / 4,329 627.5 / 705
firefox / desktop / 1× 100 C 20 / 20 91 / 101 133.32 / 183.32 2,530.5 / 4,707 587.5 / 668
firefox / mobile / 1× unloaded 10 / 10 3 / 5 18.54 / 18.62 701.5 / 760 893 / 907
firefox / mobile / 1× 0 10 / 10 115.5 / 121 125.74 / 233.3 795 / 871 909.5 / 948
firefox / mobile / 1× 5 10 / 10 100.5 / 124 118.44 / 233.32 852 / 1,050 968 / 1,339
firefox / mobile / 1× 20 10 / 10 103 / 115 117.83 / 185.32 1,021.5 / 1,244 1,156.5 / 1,229
firefox / mobile / 1× 100 10 / 10 97 / 135 134.19 / 234.52 1,389.5 / 2,217 1,373 / 1,534
webkit / desktop / 1× unloaded 10 / 10 17 / 17 24.5 / 27 177 / 191 396 / 411
webkit / desktop / 1× 0 9 / 10 2,361.5 / 3,831 131.5 / 165 180.5 / 316 407.5 / 432
webkit / desktop / 1× 5 9 / 10 3,434.5 / 5,466 124.5 / 142 499 / 945 554 / 626
webkit / desktop / 1× 20 10 / 10 3,064 / 4,103 138 / 202 513.5 / 630 513 / 691
webkit / desktop / 1× 100 B 19 / 20 2,407.5 / 4,055 212 / 289 1,735 / 5,033 1,197 / 2,092
webkit / desktop / 1× 100 C 18 / 20 2,792.5 / 5,144 207 / 317 968.5 / 4,111 625.5 / 1,735
webkit / mobile / 1× unloaded 10 / 10 16 / 18 19.5 / 20 663 / 671 864.5 / 890
webkit / mobile / 1× 0 10 / 10 2,143 / 4,610 88 / 191 679.5 / 690 877 / 916
webkit / mobile / 1× 5 10 / 10 2,671 / 4,383 126.5 / 211 702 / 815 974 / 1,075
webkit / mobile / 1× 20 10 / 10 3,071 / 4,288 101.5 / 156 700.5 / 803 1,009 / 1,120
webkit / mobile / 1× 100 9 / 10 1,866 / 4,486 194 / 291 795.5 / 1,471 1,083.5 / 1,157
CPU and event-rate diagnostics

CPU below is the incremental idle-window renderer CPU per received background wire frame, after a noncontemporaneous foreground-only control. It includes mock production/delivery and application work. Ranges bound receipt-counter windows only; they are not confidence intervals or bounds on host noise. Chromium is the only engine with this CPU instrumentation.

Viewport / throttle Backgrounds Nominal logical receipts/s Whole-window producer average, median / p95 Idle CPU ms, median / p95 Incremental CPU per received frame, median lower–upper diagnostic endpoints ms (n)
desktop / 1× 5 10 10.02 / 10.05 77.02 / 167.75 2.867–2.873 (10/10)
desktop / 1× 20 40 40 / 40.03 235.94 / 403.89 3.978–4.044 (10/10)
desktop / 1× 100 B 200 199.99 / 200.03 1,085.97 / 1,323.2 1.019–1.205 (10/20)
desktop / 1× 100 C 200 200 / 200.03 1,007.2 / 1,288.97 1.019–1.159 (10/20)
desktop / 4× 5 10 5.37 / 10.01 1,134.33 / 1,194.89 4.439–5.273 (9/10)
desktop / 4× 20 40 17.34 / 40.01 1,329.45 / 1,552.27 3.451–4.644 (9/10)
desktop / 4× 100 200 63.24 / 114.93 3,016.68 / 4,305.49 3.653–6.615 (9/10)
mobile / 1× 5 10 10.03 / 10.04 26.46 / 27.92 1.547–1.555 (10/10)
mobile / 1× 20 40 40 / 40.02 83.84 / 100.45 1.544–1.547 (10/10)
mobile / 1× 100 200 199.95 / 200.04 621.14 / 1,313.14 0.798–1.055 (10/10)
mobile / 4× 5 10 7.73 / 8.26 997.37 / 1,031.85 4.159–4.308 (10/10)
mobile / 4× 20 40 23.41 / 40 1,137.17 / 1,283.02 (n=9) 4.003–4.326 (9/10)
mobile / 4× 100 200 145.47 / 200 1,304.25 / 4,162.66 (n=9) 8.706–16.100 (9/10)

Interpretation and limits

These are descriptive baseline cells, not randomized treatment comparisons. Different load cells ran at different times on a shared host. The producer executes in the measured renderer, so its work is included in CPU and it may fail to sustain the offered rate. Whole-window average logical throughput does not prove prompt steady socket delivery. Scheduler lag is producer lateness, not a directly measured status-indicator latency. The workload starts with one foreground pane; it does not quantify multiple previously visited hidden streaming panes or an independent total-server-inventory axis.

The ownership audit found no sessions.list RPC per event. Broad receipts still cause row decoding, held-query admission, shared row/descriptor reconciliation, and ordering beyond visible DOM rows. Sidebar narration is bounded to six background interests, but retained mounted Chat panes keep their full exact subscriptions. A redesign of those owner/provenance boundaries, a worker move, and Gateway/protocol changes were not attempted. No isolated handler-cost or universal scaling-floor claim follows from this census.

Correctness and merge proof

Check Result
UI and scripts typechecks Passed
Canonical mock-state regression 3 passed
Forced-reconnect regression Old harness reproduced stale-body delivery; corrected proof opened two sockets, received 16 bodyless receipts after replacement unsubscribe, and passed final status/history/200-tool predicates
Focused lint, format, production Knip Passed on the final harness-only scope
Fresh independent reviews No actionable P0–P2 findings in final scope
Exact-head CI 42 successful jobs, including all UI unit, selected UI E2E and browser-extension checks, both real-Gateway shards, lint, types and security; test-line ratchet exception below
Startup 90,910 B gzip; one startup CSS request; unchanged
LOC 18 touched files: 13,192 → 15,375 physical lines (+2,217/−34); production renderer 1,273 → 1,273

Final CI 42436023226, attempt 1, tested head 1ab8b5c5351833d5c15a0feb64b476906616bdc0 in merge a5434b258eaee4615bc5c16194935e307b05a481, with parents b97bc15cd7afd6eea35c68c6dfb0cc07706a8671 and that head. Its tree matches an independent merge. Only the test-line ratchet and downstream aggregate failed: 6,571,207 against 6,571,142, a residual 65 lines. The exact base-only reproduction has the same 65-line debt. This PR allocates exactly its own 47 new test/helper lines; it does not allocate baseline debt or change the shared scalar. Native confirmed-cancelled replacement/admin recovery accepted the inherited-failure evidence and merged as bd1fc681705bd0ba42f53a50a21a2687ace55db3. The ratchet is not described as green.

The inspected image below contains only the synthetic fixture. It illustrates the 200-tool workload at completion; production appearance did not change. Raw real-Gateway captures remain local because they contain incidental host identity. Reports and generated measurement artifacts are not committed.

Synthetic 200-tool event-load fixture at completion

Reproduction uses the existing event-load harness documentation: scripts/bench-control-ui-engines.ts with a pinned --bundle-dir, --steps event-load-unloaded,event-load-0,event-load-5,event-load-20,event-load-100, --event-load-duration-ms 240000, and --pairs 10. Run Chromium, WebKit and Firefox at 1× for both viewports; run the same Chromium cells with --cpu-throttle 4. The rejected candidate used 20 rotated base/head/base triplets per engine at desktop100. Keep host load, source hashes, failed observations, and received/produced rates with any comparison.

…ctions

Add a protocol-grounded event workload to the existing engine harness and avoid preparing unchanged sections as tools arrive. Focused regression, type checks, lint, and independent review pass. Performance acceptance remains pending the full paired matrix and Chat bundle budget reconciliation.
Build one dependency array per rendered part and keep its context and status helpers with the render guard. Preserve the exact invalidation inputs and the existing frame lifecycle while fitting the projection line cap and Chat boot budget.

Use native keyboard activation for unmeasured event-load disclosure setup and keep live-output and final-state assertions. Extend only the default load safety ceiling; event rates and the foreground workload stay unchanged.
Discard the retained-section rendering candidate after twenty rotated triplets found worse Firefox session switching and WebKit scroll p95. Keep the protocol-grounded workload and canonical mock state for the remaining load census.

Admit the two-tool workload at scroll entry without changing the nominal schedule for larger first waves.
@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Nov 8, 2026
@clawsweeper

clawsweeper Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-08T01:15:23.214011Z 8f0072b New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui scripts Repository scripts size: XL labels Nov 8, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c643b9ee13

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@clawsweeper clawsweeper Bot added the clawsweeper:intake:feature Preliminary submission classification; full source review pending. label Nov 8, 2026
Retire mock message interests with the socket and carry lastMessageAt in terminal row patches. Correct benchmark formatting and annotate closure-only fixture methods.
@steipete
steipete enabled auto-merge (squash) November 8, 2026 01:19
@steipete
steipete disabled auto-merge November 8, 2026 01:36
Allocate the exact 47 net test/helper lines for the canonical row regression, event-load fixture support and settled read-coalescing assertion. Keep the shared scalar unchanged and do not absorb the comparison base’s 65-line debt.
@steipete
steipete merged commit bd1fc68 into main Nov 8, 2026
122 of 127 checks passed
@steipete
steipete deleted the solid2/w-perf-event-load-1107 branch November 8, 2026 02:15
@steipete

steipete commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 8, 2026
* perf(ui): measure concurrent session load and retain unchanged run sections

Add a protocol-grounded event workload to the existing engine harness and avoid preparing unchanged sections as tools arrive. Focused regression, type checks, lint, and independent review pass. Performance acceptance remains pending the full paired matrix and Chat bundle budget reconciliation.

* perf(ui): bound event-load probes and skip transcript allocations

* test(ui): bracket event-load CPU counters with receipt bounds

* perf(ui): build retained transcript dependencies once

Build one dependency array per rendered part and keep its context and status helpers with the render guard. Preserve the exact invalidation inputs and the existing frame lifecycle while fitting the projection line cap and Chat boot budget.

Use native keyboard activation for unmeasured event-load disclosure setup and keep live-output and final-state assertions. Extend only the default load safety ceiling; event rates and the foreground workload stay unchanged.

* test(ui): honor the declared event-load drain window

* test(ui): isolate typing samples and expose burst overlap

* test(ui): keep event-load recovery on canonical session state

* test(ui): capture geometry for blank event-load frames

* test(ui): publish event-load terminal messages faithfully

* test(ui): inspect event-load gaps after render delivery

* test(ui): align event-load waves with native actions

* test(ui): preserve event-load tool chronology under backlog

* test(ui): retain event-load benchmarks without renderer change

Discard the retained-section rendering candidate after twenty rotated triplets found worse Firefox session switching and WebKit scroll p95. Keep the protocol-grounded workload and canonical mock state for the remaining load census.

Admit the two-tool workload at scroll entry without changing the nominal schedule for larger first waves.

* test(ui): correct event-load reconnect and terminal deltas

Retire mock message interests with the socket and carry lastMessageAt in terminal row patches. Correct benchmark formatting and annotate closure-only fixture methods.

* test(ui): scope read coalescing to the settled phase

* test(ui): budget concurrent-session regression coverage

Allocate the exact 47 net test/helper lines for the canonical row regression, event-load fixture support and settled read-coalescing assertion. Keep the shared scalar unchanged and do not absorb the comparison base’s 65-line debt.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui ci:full Keep ordinary native-locale CI selection on the next PR run. clawsweeper:intake:feature Preliminary submission classification; full source review pending. scripts Repository scripts size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant