Repository navigation
fix(perf): measure live Control UI boots without readiness polling - #199081
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review endedClawSweeper stopped reviewing this revision because the pull request closed. |
Contributor
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
Author
|
Merged via squash auto-merge.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
The live-Gateway boot benchmark injects readiness polling into the browser window being profiled and cannot reproduce the campaign's delayed-network cases.
Related: #198911.
User Impact
No user-visible UI change. This is a measurement correction; all experimental application changes were rejected and reverted. No application speedup is claimed.
Why This Change Was Made
The existing probe now emits one fixed readiness console message; the runner installs its listener before navigation and observes navigation/readiness together. This removes
page.waitForFunctionpolling from the measured document. OptionalBOOT_RTT_MS(0–1000, default 0) reuses the existing TCP latency proxy and admission owner's public origin. The rig closes its proxy with its other resources, records RTT in each observation, and logs failed requests to preserve transport diagnostics.The smallest complete change stays in the existing benchmark: no new proxy, fixture, state owner, dependency, or application abstraction. Benchmark LOC: 514 → 537 (+39/−16); application/test LOC unchanged. Screenshots do not apply because the rendered UI is unchanged.
Evidence
The workload uses a real isolated local Gateway, 400 synthetic transcript messages, desktop 1440×1100, native HTTP cache, and blocked service workers. Browser diagnostics are separate from untraced timing. Acceptance was WebKit warm whole-ready median at least 5% faster at both localhost and 100 ms RTT, with Chromium/Firefox cold/warm within the timing band and p95 assessed against A/A. Each complete matrix uses 20 rotated base/head/base triplets (360 readiness observations), with host load recorded.
pnpm tsgo:scriptspassedpnpm deadcode:knippassedRerunnable benchmark command (built Gateway/plugin metadata and both UI bundles required):
Application experiments: none accepted
Accent-property batching produced no gain. Deferring the runtime import helped localhost but not 100 ms RTT beyond A/A. Unconditionally yielding before construction regressed Chromium warm boot by 7.8%. Racing the existing connect-dispatch receipt against a bounded task deadline was the strongest localhost result, but regressed delayed-network WebKit; its full table is below. Separating context construction from mounting then produced only −0.35% WebKit warm movement (427 → 425.5 ms), while A/A reached 419.5 ms. These application candidates are absent from this diff.
Strongest receipt-race candidate, rejected, values median / p95 ms. Control is unchanged base, rotated with the other arms:
WebKit warm localhost improved 9.78%, but 100 ms RTT regressed 3.21% median / 5.36% p95, against A/A +0.83% median. The localhost challenge-to-connect phase fell 111 → 39 ms; Chromium stayed 6.9 → 6.9 ms, Firefox 16 → 15.5 ms. This demonstrates application construction/scheduling interference, but fails whole-flow acceptance. Base-arm one-minute host load ranged roughly 4.1–7.1 locally and 2.9–6.5 at RTT.
Known local failure: the first receipt-race matrix stopped after 130 ready observations at Chromium candidate cold pair 7: an unchanged shared CSS preload failed, followed by the 30-second readiness timeout. The 374,738 B CSS asset is byte-identical (SHA-256
1b092e9e5b8a9413fc3bf141fcabd6372d4dd44b0df58b8c3e6e4a4970b5417a) and both UI index hashes matched recorded manifests. The preload failure occurs before the experimental runtime function can run; its warm-only branch was inactive on that cold case. One bounded instrumented base/candidate/control reproduction completed all six cold/warm loads, and subsequent full localhost and RTT matrices each completed 360 readiness checks. This is an investigated unresolved local resource failure, not claimed fixed or inherited: the original request's transport error/status was not captured. The added failed-request logger preserves it on recurrence. WebKit warm reload index-fetch abort/access-control errors also occurred on baseline/control (6 error rows in the complete local matrix, 60 at RTT); readiness completion is not an error-free claim.Ten-profile native sampling attribution and source-mapped frame tables
Warm pre-connect sampling attribution
Base UI 4741625; real local Gateway; 400 synthetic messages; desktop 1440×1100; WebKit 27.2 and Chromium 156.0.8078.4; service workers blocked. Ten warm profiles per engine. Diagnostic profiles are separate from untraced timing acceptance.
Qualification and limits
The pinned WebKit StackTrace move constructor omits stopwatchTimestamp during vector growth. A standalone non-OpenClaw reproduction returned 72 samples, 54 with zero timestamps. Pinned source: WebKit 56453fdfe0b0ca6258c23e6453b34f70b885d13f, Source/JavaScriptCore/runtime/SamplingProfiler.h:178. Current upstream defaults the move constructor. No issue was filed upstream.
Dense frames remain ordered. Two named 8 ms boundary loops bracket product work; their samples are excluded. The last start-marker sample and first connect-marker sample identify the slice, and their source IDs match the final document in all ten captures. This excludes prior-document unload work and post-connect stop lag without inventing timestamps. The ten slices retain 521 self samples, with no known-timestamp sample outside the Timeline boundaries. Probe-source IDs separately identify injected observer work. The marker loops are diagnostics only and never used for acceptance timings.
An independent unmarked 10 ms recapture retained 59 exact-window samples with no missing clocks: 16.9% code preparation, versus 20.5% in these denser captures. The low-resolution distribution is consistent. Frame zero is self/leaf, verified against the native implementation and a known leaf/parent workload; protocol prose claiming the reverse is wrong.
Self counts estimate proportional sampled time. They are not fabricated exact CPU milliseconds. Native work without a JavaScript parent is not proven to belong to ScriptProfiler's script intervals. WebKit Timeline/ScriptProfiler intervals are elapsed monotonic time, not thread CPU; sampling can omit native work. No claim decomposes the earlier 133 ms into exact per-frame milliseconds.
WebKit: top 15 self frames
Native symbols are C++; the final column gives one representative nearest source-mapped JavaScript ancestor, not exclusive attribution of every sample in that row. CodeBlockSet::add spans dozens of application/framework owners (the displayed prewarm ancestor occurs in 4 of its 55 samples). Equal counts are tied.
JSC::CodeBlockSet::addWebCore::CSSTokenizer::consumeIdentLikeTokenWebCore::CSSParser::consumeBlockContentJSC::CodeBlock::lineColumnForBytecodeIndex [Inspector stack capture]WebCore::CSSTokenizer::tryCreateWebCore::CSSTokenizer::CSSTokenizerJSC::FunctionCodeBlock::createoperationBitAndHeapBigIntbmalloc_heap_config_specialized_local_allocator_try_allocate_small_segregated_slow_dispatch_event_loop_pokeWTF::AtomStringImpl::add(char16_t span)WebCore::cssPropertyIDWTF::AtomStringImpl::add(unsigned char span)WebCore::Style::RuleFeatureSet::collectFeaturesJSC::CodeBlock::finishCreationChromium: top 15 self frames
Same marker-bounded product window, ten captures. Sample intervals are sorted by native timestamp and clipped to the window. Mean estimated elapsed self milliseconds are shown; they are not thread CPU counters. Native
(program)remains unattributed. Generated initializer glue retains generated locations when no original mapping exists.Exclusive sampled-work classification
Observer stacks take precedence, followed by compiler/code preparation, then mapped application/native owners. Residual module evaluation is exclusive; module-root counts below are inclusive and must not be added to this table.
JSC preparation: 91 lazy code-block preparation samples, 12 parsing/bytecode-generation samples, and 4 JIT-related samples. Inspector drops execution-tier metadata, so an exact LLInt/Baseline/DFG/FTL execution split is unavailable. No separate product ES-module linking/instantiation self bucket was observed; bytecode linking can be part of code preparation. This does not prove zero linking cost. Code-block creation may reuse cached unlinked bytecode; it does not establish a cache miss.
Source roots
This is a second attribution dimension over the same samples; it overlaps the work categories above.
The startup function and asynchronous host commits account for 254/521 (48.8%) of all retained samples. Another 61 samples (11.7%) have Solid async/scheduler roots. The native-host commits are Promise continuations; the resulting construction burst can run before a queued WebSocket task. Configuration/locale setup does not emerge as a large individual self-time frame. Theme/palette, viewport/layout, routing/CSS preload, signing and snapshot-store work are named in the work table and source mappings.
Median WebKit marker-window elapsed is 160.20 ms; median ScriptProfiler interval union is 120.76 ms. Chromium's mean clipped sampling window is 18.438 ms. These diagnostic values are not acceptance timings.
Verdict: a fixable startup construction owner is demonstrated; no JSC floor is established. The data follows the application-owner branch, so no dormant-module/byte-scaling result is claimed.