Skip to content

perf(ui): load Settings without unrelated session and Memory setup - #184754

Merged
steipete merged 5 commits into
mainfrom
solid2/w-perf-settings-eager-diet
Oct 26, 2026
Merged

steipete merged 5 commits into
mainfrom
solid2/w-perf-settings-eager-diet

Conversation

@steipete

@steipete steipete commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Opening Settings loads session-management copy, Memory plugin-slot setup, and optional session support that Settings search does not use.

User Impact

Settings makes three fewer JavaScript requests and loads 91,176 fewer raw JavaScript bytes. In 20 interleaved trials per profile, readiness over 100 ms HTTP latency improved from 1,608.95 to 1,492.10 ms median (−7.26%) and from 1,624.60 to 1,505.70 ms p95 (−7.32%). Search labels, results, routes, and the full translation catalog order stay unchanged.

Local readiness was 164.30 → 163.60 ms median (−0.43%), but p95 was 187.40 → 201.40 ms (+7.47%). The local base-vs-base control also worsened at p95 (+4.59%); task CPU was −0.63% median/−0.25% p95 and script CPU +0.11%/+0.48%. This supports the noisy-host acceptance rule, not a universal no-regression claim. Host load1 ranged from 14.90 to 20.55.

Why This Change Was Made

Settings search imported a constant from the Memory schema owner, which also imports plugin-slot selection. It also registered the full session-management English catalog for five shared labels. Move the immutable visible-key tuple into the existing config-sections owner, move those labels into the existing shared catalog, and keep the full catalog's order and values intact. Put the dependency-free dedupe helper and shared English catalog into their existing shared chunks so the narrowed imports do not pull optional session code back in.

There is no new state owner, cache, dependency, or reactive mirror. The benchmark gains a direct native Settings root target, with the same synthetic Gateway and actual production assets as the other route targets.

Evidence

Current PR production diff: merge base 2d9586cfd09bf05c5cb873d8099959e6bedd37ad, head 849fab062966ad4756cc1104d253aa08368b6ce0. Test-only repair head 68ceb23f2e38acdd826c4ceca134be3d1918adcb adds two explicit lazy-import waits; it changes no production or build input. Main was merged to resolve adjacent benchmark additions; both native Settings and Dock scenarios are preserved independently. Fresh static builds compare the native review baseline f3b04e25276cfd787ce10c9c38d2656566f77a98 with this PR head: script typecheck, benchmark formatting, both production builds, and strict performance validation pass. Their emitted input lists are identical; the only changed consumed sources are this PR’s six production files and chunk configuration. The runtime measurements below remain tied to the preserved earlier source/builds.

The measurements below compare immutable builds from base d1b5f547701774d19b9916355b5ea2991d7d3509 and clean head 0dc3178fc3832592a376ff033c0837e65d015905. They are not runtime measurements of the later integration with main. Source-map comparison maps the same 35 baseline and 32 head request groups (local/remote union) onto the fresh builds, with no extra static dependencies. Eight shared boot/style sources changed and one shared Chat source was added between the old and current builds, equally in both arms; app host, idle loader, router outlet, and config route/page sources are unchanged. This supports retaining the old causal evidence but does not establish current-head wall timings. Each build's complete inventory remained byte-identical across the runs. Coverage and timing ran separately; timing used 20 interleaved base/control/head trials per profile (120 contexts), standard median, and nearest-rank p95. Remote emulation is 100 ms HTTP latency and 10 Mbps; the synthetic WebSocket has no simulated RTT. Native Settings was exercised in Chromium at 390×844, not WebKit or hardware.

Native Settings first readiness Base Head Change
Local JavaScript requests 34 31 −3
Local HTTP JavaScript wire bytes 707,345 674,944 −32,401
Local loaded raw JavaScript bytes 2,355,663 2,264,487 −91,176
Local executed raw JavaScript bytes 688,541 667,654 −20,887
Local unexecuted raw JavaScript bytes 1,667,122 1,596,833 −70,289 (−4.22%)
Remote JavaScript requests 35 32 −3
Remote HTTP JavaScript wire bytes 711,887 679,487 −32,400
Remote loaded raw JavaScript bytes 2,364,613 2,273,437 −91,176
Remote executed raw JavaScript bytes 694,388 673,318 −21,070
Remote unexecuted raw JavaScript bytes 1,670,225 1,600,119 −70,106 (−4.20%)

Their separate session-organization, deferred support, Memory schema, and slot chunks disappear from the head load; shared code remains. A 302-byte dedupe facade remains. The unused-code reduction is a focused win; it does not meet the lane's 40% route target, and selected Settings sections remain separate work.

Timing, median / p95 Base Head Change
Local ready (ms) 164.30 / 187.40 163.60 / 201.40 −0.43% / +7.47%
Local A/A ready control (ms) 164.30 / 187.40 162.20 / 196.00 −1.28% / +4.59%
Remote ready (ms) 1,608.95 / 1,624.60 1,492.10 / 1,505.70 −7.26% / −7.32%
Local task CPU (ms) 147.5935 / 155.566 146.6585 / 155.179 −0.63% / −0.25%
Local script CPU (ms) 39.837 / 41.758 39.881 / 41.960 +0.11% / +0.48%
Remote task CPU (ms) 167.9845 / 179.825 163.785 / 169.383 −2.50% / −5.81%
Remote script CPU (ms) 42.742 / 44.665 41.7415 / 42.686 −2.34% / −4.43%

One local head timing sample had the unchanged optional app-shell-idle.runtime request pending at the readiness cutoff. It was retained; its transfer had not completed at that cutoff. All 120 timing contexts had no page errors, alerts, or workers. All four coverage contexts had no pending JavaScript, errors, or workers. Requests are frozen at readiness, but the generic DOM/RPC snapshot is read later without its own observation timestamp; the latter is not independently qualified to the same cutoff.

Fresh static builds (f3b04e25 → 849fab06):

Production bundle surface Base gzip bytes Head gzip bytes JS requests
Startup 270,991 270,968 (−23) 5 → 5
Chat 1,237,877 1,238,421 (+544) 20 → 20
New Session 751,219 752,253 (+1,034) 17 → 17

Startup CSS remains 31,981 gzip bytes in one request; all reported CSS request counts and bytes are unchanged. The small Chat/New increases are accepted against the measured remote Settings win under the campaign's ≤2 KB tradeoff. Strict performance validation passes without baseline or cap changes.

Proof Result
Preserved six-owner UI typecheck Passed on the unchanged production inputs
Focused Settings search / Memory / optional English tests 12 / 10 / 1 passed
Shared chunking tests 6 passed
i18n catalog verification 11,406 keys; ordered catalog equality preserved
Scoped format/lint and diff check Passed
Current script typecheck and benchmark formatting Passed on 849fab06
Current clean production builds and strict performance check Passed (f3b04e25 → 849fab06)
Production Knip Passed on 0dc3178; source change unchanged by integration
Independent source review Original six-file change and final chunk correction both scoped-clean
Simplification Original eight-file diff scoped-simple; follow-up adds only two explicit test waits
UI lazy-import test repair 50 tests passed once; scoped formatting and diff check passed
Independent two-line repair review Scoped-clean, no actionable P0–P2 findings

CI follow-up

CI run 40350388996 failed two UI assertions: describes cron weekdays and non-uniform minute steps without inventing a fixed interval and shows live environment facts without duplicating composer context. Both reached the existing approximately one-second assertion deadline while the lazy formatter/body content was absent. Row or heading readiness does not await that separately imported code. Each affected test now waits for vi.dynamicImportSettled() before its existing content assertions. Assertions and timeouts are unchanged; no production behavior was changed.

The unchanged PR head passed both files locally (50 tests, 6.86 seconds), as did current main 6a1f6b0c7bc (50 tests, 11.42 seconds). The two-line correction passed the same files once (50 tests, 3.73 seconds), plus scoped formatting and git diff --check. These local passes do not reproduce the CI failures or establish inherited failures; latest completed scheduled main 40352459041, at 503bc1bd4499, passed both UI cases. Fresh PR CI remains the broader proof of the correction.

That original CI run separately failed Control UI catalog bootstrap > real chat route recovers current account state after pending snapshot ordering. The latest completed scheduled main 40352459041 passed this same case; it remains unresolved in the original PR run. There is no speculative E2E change or inherited-failure waiver. The next exact-head CI run must exercise this case again before landing.

Source lines Before After
Six production owners 1,400 1,409
Production owners + chunk config 1,989 2,000
Benchmark driver 1,767 1,818
Original eight files 3,756 3,818
Two existing UI test files 1,724 1,726
All ten files 5,480 5,544

No Solid signals, memos, effects, cleanup hooks, direct DOM listeners/queries, owner APIs, manual component loaders, rendering controllers, or async state mirrors are added (all 0 → 0 across the six production owners). Existing domain WeakMaps are unchanged. The production and benchmark diff remains +83/−21 against the integrated base; including the two test waits, the complete diff is +85/−21.

The synthetic before/after Settings captures are byte-identical; the change affects loading rather than appearance.

Before After
Native Settings before Native Settings after

Move shared Memory keys into config sections and register only shared session labels for Settings targets, preserving the full catalog order and synchronous registration.
Share the dependency-free dedupe helper through the existing boot group and keep shared session English copy with the existing English group. Settings retains its search labels without evaluating optional session UI.
@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 26, 2026
@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T17:06:28.941823Z 68ceb23 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: S labels Oct 26, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. clawsweeper:intake:feature Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 26, 2026
@clawsweeper

clawsweeper Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR narrows Settings imports and shared chunk placement to avoid loading unrelated session-management and Memory setup code.

Example: Open native phone Settings at /settings in Chromium at 390×844.

  • Before: The supplied local baseline records 34 JavaScript requests and 2,355,663 loaded raw bytes.
  • After: The supplied candidate records 31 requests and 2,264,487 loaded raw bytes, with unchanged Settings appearance.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The implementation is focused and source-consistent; synthetic, preserved-build runtime evidence limits confidence in live current-head performance.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; inspected screenshots and reported production-asset measurements cover Chromium native Settings with a synthetic Gateway, while current-head evidence is static build comparison rather than fresh runtime timing.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: Opening Settings downloads and evaluates session-management and Memory setup code that its search does not need.
Reason: The maintainer-authored direction removes measurable unnecessary loading with a small change and explicitly accepts the disclosed performance tradeoffs.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it provides a focused Settings loading improvement, and review found no concrete introduced defect.

Priority: P2
Reviewed head: 849fab062966ad4756cc1104d253aa08368b6ce0

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied Chromium production-asset runs use a synthetic Gateway and preserved pre-integration builds; no isolated real-Gateway Settings run or current-head wall-timing measurement is supplied.
Agent review details

How this fits together

Settings search consumes route metadata, schema visibility keys, and translated labels; the build configuration determines which JavaScript chunks the browser loads to provide them.

flowchart TD
  A[Open Settings] --> B[Settings search]
  B --> C[Config section facts]
  B --> D[Shared English labels]
  C --> E[Search destinations]
  D --> E
  F[Build chunk configuration] --> G[Browser asset requests]
  G --> A
Loading

Technical review

Best possible solution:

Retain the narrowed imports and existing shared chunks while preserving synchronous labels and Memory search destinations.

Do we have a high-confidence way to reproduce the issue?

Current-main imports directly show Settings search reaching Memory plugin-slot setup and the full session catalog; supplied browser measurements support the loading cost, but no new reproduction was run.

Is this the best way to solve the issue?

The patch removes unnecessary dependencies at existing owners without adding state, loaders, or parallel implementations; the benchmark addition exercises the previously unmeasured native Settings root.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 91fa755ffd6d.

Provenance checked

  • Memory settings visibility keys keeps the original intent (d055c98: The earlier UI simplification established a fixed Memory schema and shared section routing; this PR relocates the unchanged tuple without changing that contract.)
  • Session English registration and catalog order keeps the original intent (c2d4264: Shared action labels were split from management copy while retaining full-catalog values and order; the patch extends that same shared owner for Settings labels.)
  • Shared chunk placement changes intended behavior with a stated reason (a36d048: Optional support was grouped outside eager Chat work; the PR explains that Settings consumers require the dependency-free helper and shared labels in existing shared chunks instead.)
  • Native Settings benchmark keeps the original intent (ce794cb: The route benchmark measured direct route loading but did not independently exercise native Settings root; the new opt-in cell preserves existing workloads.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 9432ea3 adds ui/src/pages/config/config-sections.ts:4 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 9432ea37506f; files: ui/src/pages/config/config-sections.ts)
  • Vincent Koc: Raw commit 7a6dc84 adds ui/src/pages/config/settings-targets.ts:8 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 7a6dc84576c8; files: ui/src/pages/config/settings-targets.ts)
  • Josh Avant: Raw commit 4fa2da5 adds ui/src/pages/config/settings-targets.ts:3 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 4fa2da58c127; files: ui/src/pages/config/settings-targets.ts)

PR surface

Source +11, Other +51. Total +62 across 8 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 7 32 21 +11
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 51 0 +51
Total 8 83 21 +62

Labels

Label changes:

  • add P2: This is a bounded Settings performance improvement with measured asset savings and no demonstrated urgent user regression.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: This is a bounded Settings performance improvement with measured asset savings and no demonstrated urgent user regression.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Confirm native Settings loading against an isolated real Gateway when qualifying the broader performance campaign.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 26, 2026, 12:04 PM ET / 16:04 UTC.

@steipete
steipete enabled auto-merge (squash) October 26, 2026 17:18
@steipete
steipete merged commit be4af37 into main Oct 26, 2026
110 of 112 checks passed
@steipete
steipete deleted the solid2/w-perf-settings-eager-diet branch October 26, 2026 17:56
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash auto-merge.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 27, 2026
…penclaw#184754)

* perf(ui): trim Settings search dependencies

Move shared Memory keys into config sections and register only shared session labels for Settings targets, preserving the full catalog order and synchronous registration.

* test(ui): measure native Settings root cold loads

* perf(ui): keep Settings search out of optional session chunk

Share the dependency-free dedupe helper through the existing boot group and keep shared session English copy with the existing English group. Settings retains its search labels without evaluating optional session UI.

* test(ui): await lazy chat details before assertions
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. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant