Skip to content

perf(ui): reduce Plugin and Advanced settings first-visit work - #189355

Merged
steipete merged 1 commit into
mainfrom
solid2/w-perf-long-tail-tasks-round2-1031
Oct 31, 2026
Merged

steipete merged 1 commit into
mainfrom
solid2/w-perf-long-tail-tasks-round2-1031

Conversation

@steipete

@steipete steipete commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Plugin Settings and Advanced spend first-visit main-thread time constructing unused config projections and a reactive SVG subtree for each decorative inventory chevron.

User Impact

The complete inventory and config controls render with less work. Native Find, filtering, keyboard navigation, lazy routes, and editing behavior remain available. There are no new dependencies or state owners.

Why This Change Was Made

Use the existing CSS mask for the inventory's 14 px chevrons, removing 1,000 DOM nodes while retaining all 1,000 rows. Make five existing pure config-field memos lazy so inactive branches do not resolve metadata or sensitive-value presentation. The installed Solid contract recomputes these projections when next observed.

Evidence

240/240 qualification observations passed: 20 interleaved base/head/unchanged-base-control triplets for each page and viewport, Chromium 1×. Frozen base 447e14d02460342af4fe2c98dbd5475b15b938d2, exact head d674f799b9e21449bbfeb6d256738d231fd57b4e. Fixtures use 1,000 installed plugins and the full synthetic config schema. Local fixture transport measures renderer work, not production Gateway latency. Acceptance recorded before measurement: ≥5% owning CPU/latency win, no attributable regression beyond the timing band, and explicit remaining target gap. All timing cells below are median / p95, ms.

Reproduction command (point the three bundle arguments at built base/head/base):

node --import ./scripts/tsx.mjs scripts/bench-control-ui-engines.ts \
  --bundle-dir <base-bundle> --compare-bundle-dir <head-bundle> \
  --control-bundle-dir <base-bundle> --engines chromium --cpu-throttle 1 \
  --viewport both --pairs 20 --steps page-plugin-settings-visit,page-advanced-visit \
  --output <artifact-directory>
Page / viewport Longest task: base → head (A/A) Renderer task CPU: base → head (A/A) Script CPU: base → head (A/A)
Plugin Settings desktop 123.5 / 130 → 111 / 116 (123.5 / 130) 296.0 / 308.0 → 277.8 / 290.8 (292.1 / 307.8) 105.9 / 111.1 → 105.0 / 111.1 (105.8 / 113.0)
Plugin Settings mobile 129.5 / 137 → 113.5 / 118 (130 / 132) 279.7 / 292.8 → 264.1 / 281.0 (280.2 / 285.5) 105.0 / 113.6 → 104.7 / 110.6 (105.4 / 109.3)
Advanced desktop 120 / 125 → 106 / 113 (120 / 124) 377.7 / 390.6 → 363.6 / 381.8 (372.5 / 383.7) 166.2 / 171.8 → 154.5 / 169.6 (165.4 / 171.2)
Advanced mobile 112.5 / 119 → 102 / 110 (114 / 122) 288.5 / 307.6 → 279.6 / 300.6 (288.8 / 308.2) 155.4 / 164.5 → 143.9 / 156.8 (156.7 / 167.6)

Plugin Settings total CPU improves 6.17% desktop / 5.60% mobile; Advanced script CPU improves 7.08% / 7.42%. Corresponding p95s improve. Host 1-minute load ranged 16.5–28.1; the unchanged third bundle records the A/A control under the same load.

Page / viewport Route-ready: base → head (A/A) Wall: base → head (A/A)
Plugin Settings desktop 268.3 / 276.2 → 252.9 / 260.1 (265.7 / 282.7) 361.4 / 385.9 → 344.4 / 361.5 (360.6 / 379.2)
Plugin Settings mobile 231.8 / 248.0 → 218.3 / 225.4 (232.2 / 238.4) 345.1 / 361.1 → 327.9 / 355.6 (343.9 / 361.4)
Advanced desktop 256.6 / 298.9 → 250.0 / 326.9 (254.7 / 299.8) 412.5 / 463.3 → 410.6 / 483.5 (411.2 / 445.0)
Advanced mobile 229.5 / 244.3 → 219.7 / 232.6 (231.6 / 246.3) 358.9 / 374.6 → 344.7 / 373.9 (357.6 / 376.6)

Advanced desktop readiness p95 increases 9.37%, wall p95 4.37%. The readiness measurement includes two animation-frame probes. Its highest candidate sample takes 71.7 ms more wall time than its paired baseline while consuming 4.2 ms less renderer CPU; owning CPU, script and longest-task p95s improve. This is an elapsed scheduling tail under host load. No overall latency-win claim for this cell.

Proof Result
pnpm tsgo:ui Pass
config-form.browser.test.ts, plugins/settings-editor.browser.test.tsx, config-form-map-integrity.browser.test.ts 49/49, each file once, one worker
Scoped lint and git diff --check Pass
Production pnpm deadcode:knip Pass
Fresh independent autoreview No actionable P0–P2 findings
Build + strict base/head asset check Pass; startup JS gzip 89,126 → 89,122 B; 3 → 3 JS requests; startup CSS 33,572 → 33,572 B and 1 → 1 request
Other asset changes New boot JS −60 B, chat boot JS +108 B, total CSS +11 B; all caps pass
Final traced diagnostic 12/12 passed; same 1,000 rows, inventory elements 13,024 → 12,024, same 14 × 14 px chevrons/color
Chromium 4× / WebKit guards 72/72 passed: 36 Chromium 4× + 36 WebKit 1×; both pages × desktop/mobile × visit/action/leave × base/head/control. No WebKit CPU claim.
Source size 3,541 → 3,557 LOC over five files (+39/−23)

Remaining target gap: both pages still exceed the 50 ms longest-task goal. The final mobile traced task is BlinkScheduler_PerformMicrotaskCheckpoint: Advanced 112.93 ms, including 48.16 ms of config creation; Plugin Settings 90.55 ms, including 30.18 ms of inventory construction and 11.95 ms of artwork rendering (inclusive timings). Closed config details already defer their children; 303 rows / 437 controls are mounted, with only three controls beneath closed details. Further substantial slicing needs a deliberate initial-presentation/Find/focus contract rather than another speculative scheduler. Apps' measured task belongs to the excluded shared chat width-edge owner; no Apps code or performance claim is included.

Mobile visit CLS is 0 in all qualification observations. Desktop ~0.01 remains the shared settings-sidebar width transition seen on base, head and control; no CLS repair is claimed here.

Qualification min–max ranges (ms)
Page / viewport Metric Base Head A/A control
plugin-settings / desktop longest 119.0–130.0 105.0–118.0 117.0–132.0
plugin-settings / desktop cpu 278.6–308.3 267.0–293.9 274.5–315.3
plugin-settings / desktop script 99.9–112.1 98.2–112.4 99.9–114.0
plugin-settings / desktop ready 224.9–283.7 210.2–261.5 213.7–286.5
plugin-settings / desktop wall 345.3–393.8 326.7–362.0 344.1–379.7
plugin-settings / mobile longest 122.0–137.0 108.0–118.0 124.0–133.0
plugin-settings / mobile cpu 263.0–293.6 250.1–281.9 269.5–286.7
plugin-settings / mobile script 97.7–114.5 96.9–114.3 98.3–109.5
plugin-settings / mobile ready 217.1–249.9 204.3–237.9 220.7–239.9
plugin-settings / mobile wall 326.8–389.6 311.2–359.2 325.0–361.4
advanced / desktop longest 104.0–126.0 96.0–136.0 109.0–124.0
advanced / desktop cpu 344.4–395.9 338.4–383.0 337.8–386.7
advanced / desktop script 147.8–174.5 139.4–170.4 152.1–172.0
advanced / desktop ready 229.6–365.9 211.8–353.6 224.2–316.1
advanced / desktop wall 379.3–505.6 375.5–527.6 377.4–467.0
advanced / mobile longest 104.0–122.0 96.0–116.0 105.0–123.0
advanced / mobile cpu 273.5–312.2 269.3–308.6 272.9–311.3
advanced / mobile script 145.3–169.1 139.7–161.8 144.0–169.0
advanced / mobile ready 215.8–248.6 209.0–243.5 215.8–251.3
advanced / mobile wall 341.7–376.5 327.9–376.1 328.6–380.8

Solid refactor audit: no new signals, effects, controllers, listeners, DOM queries, owner APIs, or cleanup. Pure lazy memos increase from 1 to 6. Reports and raw measurements remain artifact-only.

The four attached before/after mobile screenshots use synthetic fixtures, were inspected, and are byte-identical within each page pair. Plugin chevrons preserve size, color and layout; Advanced preserves presentation.

Plugin Settings before, synthetic 1000-plugin catalog

Plugin Settings after, same catalog and chevron geometry

Advanced before, synthetic config

Advanced after, same config and geometry

@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 31, 2026
@clawsweeper

clawsweeper Bot commented Oct 31, 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.

@clawsweeper clawsweeper Bot added 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:feature Preliminary submission classification; full source review pending. labels Oct 31, 2026
@clawsweeper

clawsweeper Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR replaces decorative plugin chevron SVG subtrees with existing CSS masks and defers five unused config-field derivations.

Example: Open Plugin Settings with 1,000 installed plugins.

  • Before: Each row constructs a reactive SVG chevron subtree.
  • After: Each row uses one CSS-mask element while retaining the complete inventory.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A small, coherent optimization with inspected visual evidence and no actionable code finding; performance confidence remains limited by diagnostic-only measurements.
Proof confidence 🦐 gold shrimp (3/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: Large Plugin Settings inventories and Advanced configuration forms spend avoidable main-thread work on first visit.
Reason: The maintainer-directed change removes concrete waste without reducing the inventory, hiding controls, adding dependencies, or introducing another state owner.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it is a focused, maintainer-directed optimization with distinct value, and source review found no introduced correctness defect.

Priority: P2
Reviewed head: d674f799b9e21449bbfeb6d256738d231fd57b4e

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The declared untraced base/head/control qualification and throttled Chromium, WebKit, action, and departure guards remain pending; screenshots and traced diagnostics do not establish performance acceptance.
Agent review details

How this fits together

The Control UI receives plugin inventories and configuration schemas from existing owners, then renders searchable plugin rows and editable configuration fields.

flowchart LR
  A[Gateway inventory and config] --> B[Existing UI state owners]
  B --> C[Plugin Settings inventory]
  B --> D[Shared config renderer]
  C --> E[Shared CSS icon masks]
  D --> F[Lazy field derivations]
  F --> G[Existing edit callbacks]
Loading

Technical review

Best possible solution:

Retain this small optimization using the existing icon and config-rendering owners, with its declared performance acceptance demonstrated before readiness.

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

Current-main source shows eager derivations for inactive branches and per-row SVG construction; supplied diagnostics corroborate avoidable work, but no target code was executed during this read-only review.

Is this the best way to solve the issue?

The patch directly removes unnecessary rendering work while preserving existing mutation, draft, search, and sensitive-value owners; the simplification review found no unnecessary machinery or test scaffolding.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 298b86c81fa0.

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Verified introduced change: The pinned introduction changes only rendering representation and memo evaluation; it adds no state owner, dependency, configuration option, or persistence change. (ui/src/components/config-form.node.tsx:121, d674f799b9e2)
  • Existing presentation owners reused: The mask helper already supplies immutable shared artwork, and existing CSS supplies currentColor masking; changed metadata and sensitive-value derivations remain pure reads. (ui/src/components/solid/icon.tsx:14, d674f799b9e2)
  • Current main still needs this optimization: The affected files match the introduction base on fetched main, retaining eager derivations and SVG inventory chevrons; the earlier optimization at perf(ui): defer hidden long-tail page rendering and add route census #189024 deferred collapsed descendants and contained inventory rows instead. (ui/src/components/config-form.node.collection.tsx:108, 298b86c81fa0)
  • Inspected visual evidence and declared qualification gap: All four downloaded mobile screenshots were inspected and show matching plugin and Advanced layouts. The full live PR body explicitly identifies timing results as traced diagnostics and leaves untraced qualification, throttled runs, and WebKit/action/departure guards pending. (d674f799b9e2)
  • Authoritative lazy-memo contract: The patch imports createMemo from pinned Solid rc.18, making its contract relevant; the rc.18 source referenced by repository guidance documents deferred first computation and disposal when unobserved. Installed dependencies are absent locally, so the upstream pinned cheatsheet was read. (packages/solid/CHEATSHEET.md, 225014bf8757)
  • Policy and history limits: Root and UI guidance were read and applied; no deeper ancestor AGENTS.md or maintainer-notes directory was found. Some historical stat and blame reads encountered unavailable promisor blobs; current changed modules, original hunks, feature logs, supplied provenance, and relevant historical PR reasons were available. (ui/AGENTS.md:5, d674f799b9e2)

Likely related people:

  • RoboClaw: Raw commit 67c3c3a adds ui/src/pages/plugins/settings-view.tsx:135 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 67c3c3abfa66; files: ui/src/pages/plugins/settings-view.tsx)

PR surface

Source +16. Total +16 across 5 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 5 39 23 +16
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 39 23 +16

Labels

Label changes:

  • add P2: Reduces first-visit rendering work for large inventories and configuration forms without changing capabilities or persisted behavior.
  • 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: Reduces first-visit rendering work for large inventories and configuration forms without changing capabilities or persisted behavior.
  • 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.

  • Complete the declared serial untraced qualification and interaction guards, publishing median, p95, spread, host load, and A/A controls against the recorded acceptance rule.

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 31, 2026, 8:26 AM ET / 12:26 UTC.

@steipete
steipete marked this pull request as ready for review October 31, 2026 12:50
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 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-31T12:52:28.765528Z d674f79 Draft marked ready
ℹ️ 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.

@steipete
steipete enabled auto-merge (squash) October 31, 2026 12:52
@steipete
steipete merged commit af300f4 into main Oct 31, 2026
171 of 175 checks passed
@steipete
steipete deleted the solid2/w-perf-long-tail-tasks-round2-1031 branch October 31, 2026 13:01
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash auto-merge.

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. 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