Skip to content

refactor(glyph): retain preparation and stream rope publication - #292

Draft
thejustinwalsh wants to merge 8 commits into
mainfrom
feat/publication-range-spike
Draft

thejustinwalsh wants to merge 8 commits into
mainfrom
feat/publication-range-spike

Conversation

@thejustinwalsh

@thejustinwalsh thejustinwalsh commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

Draft frontier for #247: full assignments prepare target-owned text/layout in Rust, preserve sparse dirt through the existing retained rope/gather/publication owners, and reuse accepted Three topology through #291. Existing public setter ergonomics, immediate measurements, batching and explicit publisher lifetime remain intact. Replaced mutation scans and measurement reconciliation helpers are retired; this does not add a second preparation pipeline.

The latest gather change streams dirty owners through one traversal of the existing source rope and glyph callback. Count changes and early Stop resume the existing suffix builder; clean decoration records, recordless owners and failure recovery remain covered by independent cold-output controls.

This PR depends on #291 and remains draft. It is not required for the small publication release cut. Original development history is preserved in local backup refs; the final source delta was consolidated before rebasing to avoid replaying obsolete settlement/error implementations already retired on main.

Current combined native shaper suite passes, including 399 unit tests and independent outline/public API controls. The integrated Wasm/TypeScript build is running; combined Node/fuzz/static, exact-artifact size, performance and live browser validation remain pending. Earlier rope timings do not clear this head. Independent reviews of the host integration and authenticated gather-stream patch found no actionable defect; these reviews are scoped and are not a new audit of every historical change.

Remaining gates are tracked in .agents/docs/planning/publication-frontier.md: bulk/edit-sized publication performance, exact draw map/reduce, cumulative retirement/maintainability/size, exact-head CI and release-readiness. #247 is not closed. CI uses benchmark:stress; full combined release comparison follows only after correctness and artifact gates pass. Do not merge this draft based solely on the standalone #291 report.

@thejustinwalsh
thejustinwalsh added this pull request to stack #293 October 10, 2026 16:49
@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Docs report 📚

Every changed package is attested at this head. A reviewer verifies each claim after merge.

Package Concept Attestation Status
@pmndrs/glyph-benchmarks packages/benchmarks.md · edited Promoted the existing offline packed-core-consumer peer isolation to the lowest held layer; package concept remains acc… ✅
@pmndrs/glyph packages/glyph.md · edited Preserved prepared anchor measurements and explicit renderer invalidation in the lowest held layer; corrected existing … ✅

✅ attested · ⚠️ stale · ❌ missing

@thejustinwalsh thejustinwalsh changed the title feat/publication range spike refactor(glyph): retain preparation and stream rope publication Oct 10, 2026
@thejustinwalsh thejustinwalsh added the benchmark:stress Run the focused stress Labs suite label Oct 10, 2026
@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

size-limit report 📦

Surface gzip Surface gzip
Core JS 91.9 kB (+0.82% Size increase) Inter font · Bitmap 558.2 kB (0%)
Shaper Wasm 592.9 kB (+9.47% Size increase) Inter font · MTSDF 8.17 MB (0%)
Three.js adapter JS 143.4 kB (+0.67% Size increase) Inter font · Slug 618.3 kB (0%)
React adapter JS 143.1 kB (+0.62% Size increase) Font Awesome icons · Bitmap 449.9 kB (0%)
Vue adapter JS 142.9 kB (+0.62% Size increase) Font Awesome icons · MTSDF 8.76 MB (0%)
R3F hello-world app JS 747.9 kB (+0.12% Size increase) Font Awesome icons · Slug 657.9 kB (0%)
Tres playground app JS 572.2 kB (+0.16% Size increase) Bitmap baker JS 4.9 kB (0%)
Font validator JS 144.8 kB (0%) Bitmap baker Wasm 231.1 kB (0%)
Runtime bake host JS 6.1 kB (0%) MTSDF baker JS 5.6 kB (0%)
Runtime bake Worker JS 13.5 kB (0%) MTSDF baker Wasm 215.5 kB (0%)
Font baker JS 2.6 kB (0%) Slug baker JS 4.5 kB (0%)
Font baker Wasm 389.0 kB (0%) Slug baker Wasm 183.7 kB (0%)

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Package performance: stress suite

4 faster · 1 slower · 3 neutral · 0 skipped

Baseline 0.1.0-canary-4e25a96a-20261015 → candidate 0.1.0 (f07e2120)

Latency distribution across 8 comparable workload p50s. Each workload counts once; these are not frame times.

statistic baseline candidate
Median workload p50 3.660ms 3.825ms
Workloads ≤1 ms 3 3
Workloads ≤2 ms 4 4
Workloads ≤3 ms 4 4
Workloads >3 ms 4 4

Largest candidate workloads (including neutral results):

workload baseline candidate Δ time
publish 1024 retained Text instances 40.40ms 79.32ms +38.920ms
reorder then edit one of 1000 retained labels 14.34ms 12.68ms -1.660ms
borrow glyphs from 1000 steadily promoted retained labels 5.62ms 6.12ms +0.500ms
reorder 1000 unchanged retained labels 6.56ms 5.98ms -0.580ms
toggle one group containing 1000 retained labels 1.70ms 1.67ms -0.030ms
                                                             faster ◀       ┊       ▶ slower    Δ p50      p  baseline   candidate
- publish 1024 retained Text instances                                      ┊              ▶   +96.3%  <.001  ▅█▁▁▁▁▁▁▁▁ ▁▁▁▁▁██▇▇▂
+ reorder 1000 unchanged retained labels                                ├●─┤┊                   -8.9%   .015  ▁▂▇█▃▃▂▁▁▁ ▄▆█▅▄▁▁▁▁▁
+ reorder then edit one of 1000 retained labels                        ├─●  ┊                  -11.6%  <.001  ▁▁▃█▇▅▃▂▃▁ ▃█▅▃▂▂▁▁▁▁
+ edit and sparsely borrow one of 1000 retained labels              ├●─┤    ┊                  -23.4%  <.001  ▁▁▁▇▇█▆▄▃▁ ▂██▅▂▁▁▁▁▁
+ edit and measure one of 1000 retained labels                    ●┤        ┊                  -32.2%  <.001  ▁▁▁▅▇█▅▅▂▃ ▃█▆▂▁▁▁▁▁▁
  borrow glyphs from 1000 steadily promoted retained labels              ├──┼──●───────────▶    +8.8%  1.000  ▅▄▆▃▁▁▁▆▅█ ▁▁▂▃▃▃██▃▁
  measure 1000 unchanged retained labels                                ├───●───┤               +1.3%   .721  ▁▅▆▆█▆▄▄▂▁ ▂▅▆▇█▆▄▄▂▂
  toggle one group containing 1000 retained labels                        ├●┼─┤                 -2.0%   .959  ▁▃▇▆█▄▃▂▁▁ ▁▃█▆█▅▃▂▂▁
                                                             └──────────────┴──────────────┘
                                                             -50%           0           +50%
status bench baseline candidate Δ time Δ p50 p 95% CI
🔴 slower publish 1024 retained Text instances 40.40ms 79.32ms +38.920ms +96.3% <.001 +92.0..+99.7%
🟢 faster reorder 1000 unchanged retained labels 6.56ms 5.98ms -0.580ms -8.9% .015 -11.8..-2.1%
🟢 faster reorder then edit one of 1000 retained labels 14.34ms 12.68ms -1.660ms -11.6% <.001 -17.5..-10.6%
🟢 faster edit and sparsely borrow one of 1000 retained labels 825.42µs 632.28µs -0.193ms -23.4% <.001 -26.8..-17.8%
🟢 faster edit and measure one of 1000 retained labels 709.92µs 481.54µs -0.228ms -32.2% <.001 -34.9..-28.5%
3 neutral, 0 skipped
status bench baseline candidate Δ time Δ p50 p 95% CI
neutral toggle one group containing 1000 retained labels 1.70ms 1.67ms -0.030ms -2.0% .959 -6.5..+6.3%
neutral measure 1000 unchanged retained labels 509.91µs 516.39µs +0.006ms +1.3% .721 -12.0..+14.2%
neutral borrow glyphs from 1000 steadily promoted retained labels 5.62ms 6.12ms +0.500ms +8.8% 1.000 -11.6..+54.1%

@thejustinwalsh
thejustinwalsh force-pushed the feat/publication-range-spike branch from 1d44553 to 833aea4 Compare October 18, 2026 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

benchmark:stress Run the focused stress Labs suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant