Skip to content

Reduce state-read and browser layout overhead - #214

Merged
max-sixty merged 3 commits into
mainfrom
codex/leaf-ui-performance
Sep 2, 2026
Merged

max-sixty merged 3 commits into
mainfrom
codex/leaf-ui-performance

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

State responses and browser refreshes repeated work even when their inputs were unchanged. Cache CSS readings by exact content, index sibling positions once per signature pass, retain unchanged pending markers, and batch margin measurements and writes. Margin Buttons also now follow their targets after an earlier control cluster docks into document flow.

Measured costs and regression coverage

Local warm measurements:

Path Before After
State read on the design-decision example 124 ms 15–16 ms
Signature pass over 2,000 sibling IDs 317 ms 1.8 ms
Margin placement on the composed corpus about 45 ms, 26 layouts about 2 ms, 2 layouts
Unchanged pending marker per heartbeat 2 attribute writes 0

Regression tests count actual CSS parsing, browser layout work, and pending-marker mutations; cover same-length CSS edits and mixed docked/hanging rows; and preserve signature ordering. Existing projection expectations were refreshed after reproducing their failures against the original HEAD. The published-example check now distinguishes open and resolved conversations in its shipped log.

Validation: all 799 everyday tests, all 129 margin/projection browser tests, the focused published-example regression, and all pre-commit hooks pass. A browser sweep exercised selection, scrolling, version travel with an unsent draft, tabs, options, card dragging, and draft saving across light/dark and desktop/narrow layouts.

This was written by Codex on behalf of max-sixty

@max-sixty
max-sixty merged commit 9b1e082 into main Sep 2, 2026
6 checks passed
@max-sixty
max-sixty deleted the codex/leaf-ui-performance branch September 2, 2026 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants