Skip to content

perf(lynx): execute compiled native-list cells - #314

Merged
Huxpro merged 2 commits into
new-lynxfrom
huxcx/m3-list-program-cell-final-193
Sep 8, 2026
Merged

Huxpro merged 2 commits into
new-lynxfrom
huxcx/m3-list-program-cell-final-193

Conversation

@Huxpro

@Huxpro Huxpro commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • execute deferred addressed list-item programs when native componentAtIndex materializes a cell, using the resident straight-line create driver instead of replaying the generic element-command stream
  • bind all public scalar list-item layout hints (sticky-top, sticky-bottom, full-span, and estimated-main-axis-size-px) into the compiled cell program while keeping dynamic/unsupported shapes on the existing descriptor fallback
  • keep per-cell public handles and event targets private until the platform actually materializes the row; journal every created node/listener so a partial program fault cleans up through the existing host transaction
  • expose profile counters for compiled cell runs and their fallback reasons without changing non-profile production behavior

This is #193 Layer 1's materialization half and part of #290. The producer/transport prerequisite landed separately in #312; this PR contains only the compiled-cell consumer.

Native evidence

Device: Android Aries 10, official Lynx Explorer 4.1, thermal status 0. Candidate implementation source: c270adf13; branch head only merges the already-green new-lynx base after that implementation commit.

Cold fresh-cell gate

Five fixed B/C/C/B pairs, 10 fresh pages per arm. Every page materialized exactly 9 cells and recycled 0.

  • total duration: 3.1333 → 2.7111 ms/cell (0.8652x aggregate); median 2.8333 → 2.5556 (0.9020x)
  • callback wall: 3.0889 → 2.6667 ms/cell (0.8633x aggregate)
  • framework wall: 0.7667 → 0.5333 ms/cell (0.6957x aggregate); median 0.8889 → 0.5000 (0.5625x)
  • all five pairwise total ratios: [1.100, 0.882, 0.622, 1.020, 0.821]; the aggregate/median result, rather than pair unanimity, is the claim

The call ledger rules out hidden host work. Baseline and candidate both made 18 ID allocations, 63 attribute writes, 63 class writes, and 10 flushes. Baseline materialized the cell subtree through 63 generic CreateElement + 63 InsertElementBefore calls; candidate used 9 list roots plus 18 views, 36 texts, and 54 appends through the resident program. Flush cost was identical in aggregate.

Receipt: /data00/home/xuan.huang/.codex/tmp/m3-native-list-cold-c270-final.json, SHA-256 3a53c82240e027e3967fd2fe85d3f33e976efcabc59514fec720acfdbc7c1c6e.

Steady recycle gate

Fixed B/C/C/B, 10 formal windows per block, 20 windows per arm. Every retained window satisfied materialized >= 50 and recycled >= 50.

  • broad population (1,110 baseline / 1,112 candidate materializations): total duration 0.9874x, materialize 0.8580x, callback 0.7781x, framework 0.6950x, materialize-framework 0.7869x, flush 0.9656x
  • most common exact shared signature (55 materialized / 56 recycled): total 0.9481x, materialize 0.8543x, callback 0.7856x, framework 0.7256x, materialize-framework 0.8113x, element 0.8842x, flush 0.9420x
  • the broad element-only counter increased 1.0733x while the matched-signature cell improved; it is disclosed rather than netted out

Receipt: /data00/home/xuan.huang/.codex/tmp/m3-native-list-steady-c270-final.json, file SHA-256 10fa4b3f3a547ac8fc146ed0c30e11e5ca21a706ff911bcc4812c97d562f1843.

Size and build controls

  • exact implementation bundle: 579,600 raw / 206,270 gzip, SHA-256 05dd10953c2282d1f30cf97c4167dca4ebbf88debb3d0685842cfcb3747644d7
  • same fixture at merged base f7d8c56c8: 576,756 raw / 205,157 gzip, SHA-256 a10bcd7ab77dedda09ccf178d6eb7df740262d5283a5a14ec172ecfeb4a9fc7c
  • stacked perf(lynx): retain initial list program proofs #312 + consumer device-probe cost versus f7d8c56c8: +2,844 raw / +1,113 gzip
  • exact core-switch receipt SHA-256 d1528980b5b8e1c859fe2add693da1853634f8a8278d7763f8458cf672d59176; all controls passed. block+program was 468,260 raw / 177,748 gzip / 148,167 Brotli.
  • consumer's controlled block+program marginal over perf(lynx): retain initial list program proofs #312 producer+ACK: +1,942 raw / +962 gzip / +767 Brotli

The size tax is real and remains far above #290's final product gate; this PR does not claim to close M3 or flip the default.

Validation

  • full Lynx project: 50 files / 879 tests
  • focused final suites: 3 files / 72 tests
  • source-only typecheck for emitter, compiler entry, and host driver
  • explicit formatting check for every changed file
  • pnpm sync
  • production Rspack backend-signature and core-switch controls
  • real Native cold and steady gates above

Fallback / scope

Addresses #193 and advances #290.

Provenance

  • An agent produced this diff (agent-authored)

Execute compiler-emitted resident create programs for native-list cells, with transactional fallback and measured Native fresh/steady wins.

@Huxpro
Huxpro marked this pull request as ready for review September 8, 2026 21:34
@Huxpro
Huxpro merged commit f8e6773 into new-lynx Sep 8, 2026
46 checks passed
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