Skip to content

experiment(core): layered paint grid with measured performance tradeoffs - #1466

Draft
kommander wants to merge 28 commits into
mainfrom
experiment/layered-paint-grid
Draft

experiment(core): layered paint grid with measured performance tradeoffs#1466
kommander wants to merge 28 commits into
mainfrom
experiment/layered-paint-grid

Conversation

@kommander

@kommander kommander commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Status

Draft opt-in candidate. Explicit startup-cost decision required; the universal
performance goal remains unmet.
The owner permits one or two1-3% benchmark
losses with substantial remaining gains. Minor warm losses fit that tolerance;
larger first-use/mixed costs do not become acceptable by averaging them away.

Runtime remains d86dd308, secured at a8801276, versus actual main 202e1e6a.
The focused continuation retained no runtime change. Recommendation: keep this
low-complexity candidate disabled by default and explicitly accept the disclosed
startup cost for opt-in selective scenes, or decline it. Do not automatically add
another recording strategy or mark the PR ready. This is a tradeoff recommendation,
not a proof that no future architecture could improve startup.

Architecture

  • Target-owned glyph/style spans, bulk fills and ASCII TextBuffer/drawText inputs;
    scalar handling remains for wide/complex/shared-tab inheritance semantics.
  • One command list and owned arena, old/new streams for comparison, bounded
    wide/inherited dependency closure. No reverse cell index or duplicate renderer.
  • Initial/consecutive known-full frames skip recording transactions and initial
    grid allocation. Native owns invalidation/recovery; the JS flag owns only the
    outstanding recording obligation. Raw writes, late fallback and scope cleanup
    remain intact. Root uses its existing geometry revision, not duplicate state.
  • Whole runtime diff:10files,+1135/-72, including623line engine and+260/-67 native
    buffer integration. Tests/reports excluded from those counts, not removed.
    Redundant owner fields and identical raw/direct modes were already removed.
  • New direct-binding trial removed forwarding methods with no native ABI change,
    preserving status2 throw BEFOREtry/finally. It was measured and rejected, not
    shipped for fractional warm noise. No new runtime memory or strategy framework.

Fresh First-Use Evidence

  • Two five-repeat actual-main/current focused batches, local/layout/generic,
    120x40 and240x80 bothdepth4, ON/OFF,1000/600 steady frames after all28mixed frames.
    Same observer-free harness, rotating sources, verified normal binaries. No
    forcedGC, dropped tails, hidden prewarming or inferred pause subtraction.
  • First capture remains0.94-1.20ms small versus0.38-0.43ms ordinary main frame;
    large1.28-1.67ms versus0.63-0.75ms. These ranges are workload/batch medians, not
    per-repeat ranges. All first2/3 totals and individual distributions are linked.
  • Smallgenericmixed+32.3/+21.3% across the two batches. Smalllocal+0.2/+4.4%,
    layout+1.8/+7.9%. Large mixed signs vary versus prior matrices; full ranges and
    pauses retained, no claim old large losses were GC or have universally vanished.
    -20fresh phase JSC profiles show Root first capture smallLLInt/largeBaseline,
    with scope and native text work also sampled. Not proof the entire gap isFFI/JIT.
  • Seven alternating baseline/direct-binding repeats: capture1-11%better, but
    smallfirst3+3-6%, layoutmixed+6.2/+5.9%. Rejected and fully restored. Small
    constructor+first3 separately19.685->20.300ms; no constructor-hidden benefit.

Full Warm Matrix

Historical final simple-* source/binary-identical results, not newly rerun:
allnine ON/OFF, seven1000-frame repeats at120x40/depth1, five600 at240x80/depth4,
with rotating main/current/prior and separate original-driver observer family.

  • Small selective warm means: unchanged-49.5%, localized-22.3%, outside-67.9%.
    Generic-11.1%, raw-12.4%, image-17.8%. Small losses:layout+2.7%, scroll+2.4%,
    broad+0.6%; layout/scrollp50 improve, broadp50+1.3%.
  • Large selective means:-55.9/-32.6/-75.9%. Layout-7%, generic-5.2%, raw-9.1%,
    image-12.5%, scroll-4.5%; broad+2.1%,p50+0.4%.
  • Historical mixed losses include smalllayout+17.4%,local+12%, large local+10.6%,
    generic+11.6%. These remain published, not replaced selectively by fresh wins.
  • Original2016normal/transition four-channel matches remain exact-source evidence.
    Initial native grid allocation0; retained capacity about94/173KB small and
    243/542KB large plain/outside, notRSS or cumulative allocation traffic.

Validation

  • Fresh restored Core17tests/260assertions; trial17tests passed too. No weakened
    coverage. Final docs-only fmt/lint/diff checks pass.
  • All705baseline source/library pins and234measurement pinsets verified. Both
    normal libraries03acd5fa. Only the rejected trial'stwoTSfiles differed.
  • Prior exact-source full rootReleaseFast/native2134/Core5500/Node26Core4757/
    packedBun+Node/React59/Solid271 remain evidence, not newly rerun counts.
    Earlier6890Solid crash and passing rerun stay disclosed; finald86Solid passed.
  • Primary HEAD, dirtylock and index preserved exactly; no otherrefs/PRs, host,
    toolchain, newworktree/cache or cleanup changes. Same draft PR; no merge/ready.
  • CI is observed once after this publication. No green-CI claim or polling.

Reports

@kommander kommander changed the title experiment: track layered paint contributions experiment(core): layered paint grid with measured performance tradeoffs Aug 29, 2026
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.

1 participant