Skip to content

perf(lynx): cut keyed component materialization cost - #31

Closed
Huxpro wants to merge 1 commit into
perf/lynx-s3-attributionfrom
perf/lynx-s3-bts-materialization
Closed

Huxpro wants to merge 1 commit into
perf/lynx-s3-attributionfrom
perf/lynx-s3-bts-materialization

Conversation

@Huxpro

@Huxpro Huxpro commented Aug 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • cut Lynx keyed-component create@10k BTS active time from 880.891 ms to 451.112 ms profiled / 432.327 ms unprofiled
  • reduce owner drafts from 20,001 to 1 and staged commands from 160,000 to 10,000
  • preserve keyed identity, conditional-hook owners, reverse-renderer boundaries, cold operations, and storm semantics

Why

Changes

  • add compiler proof for keyed single-component list bodies, direct component props, and lazy owner restoration
  • retain unchanged stateless component subtrees while preserving hook/context/error/Suspense owner semantics
  • compact transport-approved plan instances before per-host staging and derive acknowledgement topology from the plan
  • add deterministic allocation attribution, regression tests, raw CPU/cold/storm samples, a performance report, and patch changesets

Validation

  • pnpm format:check — not run repo-wide; all changed text files passed pnpm format:files and git diff --check
  • pnpm typecheck
  • pnpm test — full run during iteration: 17,034 passed / 23 failed; the 2 relevant dev/prod retained-replay failures were fixed and pass in the focused suite, while the remaining 21 were unrelated environment/existing failures (EXDEV temp rename, browser/differential timeouts, and the pre-existing website benchmark-card expectation)
  • targeted tests: 8 files / 269 tests passed across universal renderer, plan instances, retained replay boundaries, Lynx main renderer, and milestone-7 integration
  • pnpm bench:lynx-attribution:test (2/2)
  • pnpm sync
  • formal n=5 CPU/cold/storm matrix with semantic and identity oracles; raw samples in s3-2-final.json.gz and s3-2-control-cpu.json.gz

Risk / follow-ups

  • the compiler specialization is capability-gated and falls back to the existing owner/materialization path for authored keys, spreads, children, hooks, nested components, and unsupported plan shapes
  • retained heap is 7,977 B/row versus perf(lynx): attribute FCP and create stages #22's 15,075 B/row; the separate raw heap/dominator evidence is intentionally reserved for the next S3-4 stacked PR
  • update storm retains perf(lynx): attribute FCP and create stages #22's inherited 5–6 commit envelope; S3-5 will make commit/command constants deterministic in the final stack layer

Closes #27

Stack: #25 → this PR

Provenance

  • An agent produced this diff (agent-authored)

@Huxpro

Huxpro commented Aug 11, 2026

Copy link
Copy Markdown
Owner Author

Conclusion: close as superseded for product code. Upstream PRs 693 and 700 now own compact materialization and incremental execution; the remaining teardown-topology hypothesis is isolated in Huxpro/octane issue 43.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant