Skip to content

fix(three): make material position stage and space explicit - #311

Draft
thejustinwalsh wants to merge 4 commits into
mainfrom
fix/181-three-material-position
Draft

thejustinwalsh wants to merge 4 commits into
mainfrom
fix/181-three-material-position

Conversation

@thejustinwalsh

@thejustinwalsh thejustinwalsh commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Addresses #181. Custom Three material factories receive stage-safe position and paragraphPosition nodes. position is draw-local; paragraphPosition uses paragraph-local, +Y-up coordinates. The default material retains its raw vertex graph so Bitmap and decoration shaders preserve vertex builtins through TypeGPU-to-TSL on WebGL2. Documentation covers direct/indexed transforms, displacement, paragraph texture mapping and inspection bounds.

Built-in default cache misses now skip two unused VaryingNode constructions. Custom factories retain both stage-safe nodes, undefined still falls back to the raw default, and the selected material is owned once. Cache hits are unchanged. A custom cache miss now constructs one additional context object; no end-to-end latency gain is claimed.

Validation

Current head 4bc98799 passed the complete local Glyph check (tests, TypeScript/declaration consumers, lint, formatting and Rust fmt/Clippy), eight focused shader tests, both actual downstream example-package checks (13 raster tests and five renderer tests plus typechecks), and the 16-case material-position pixel proof through an isolated Portless route. The rendered proof covers stable TSL/TypeGPU, WebGPU/WebGL2, direct/indexed transforms and displacement. Owned listeners were closed. Fresh scoped Sol High review and integrating review found no actionable defect. The first refinement head f985944b failed CI because the private helper mapped over the open material-context map; a downstream raster augmentation lacks its built-in-only field. The helper now names only its four built-in callers. All 238 JS, five Wasm and 227 declaration bytes match that prior candidate, so its rendered proof is reused. The failed CI receipt is retained. Exact-head 4bc98799 passes all five jobs in run 39293379442: Static checks, Docs report, Package size report, Check and Package performance report. The eight-block Ubuntu full-suite report classifies 3 faster / 0 slower / 96 neutral, with nine skipped workloads, against main canary 0.1.0-canary-4e25a96a-20261015. These classifications retain the workflow’s materiality/statistical rules and exclusions; neutral is not proof of zero effect. This new result is separate from the historical measurements below; no isolated material-realization latency gain is claimed.

Against a separate exact e4498972 build, only three/internal/material-realizer.js changes among 238 JavaScript members: 10,862→10,725 raw bytes and 3,993→3,959 Node 24 gzip9 bytes. All 227 declaration members match byte-for-byte. Tracked Rust, generated ABI/Unicode and build-policy/dependency inputs match. Text-shaper and Slug Wasm match; three rebuilt baker Wasms differ for an unestablished reason. A subsequent authenticated binary-section inspection resolves all imported/exported function parameter/result vectors and finds them identical across all five modules. This is not code-semantic, memory-layout or lifetime equivalence proof. No baseline binaries were substituted. Verification is summarized in the committed change log; raw builds, signature receipts and logs remain on this machine.

Performance admission remains open

Previous-head CI had 100 comparable workloads: 17 faster, 15 slower, 68 neutral, with eight exclusions (seven clock-confounded and one mode mismatch). Slower rows included unchanged-label inspection and width reflow. That comparison used the published main canary; its authenticated packages differed only in the material-realizer executable member. Cached inspection/copy calls do not reach the changed cold path, but indirect effects were not ruled out.

The previous coordinated local eight-block wave classified all six smoke cases neutral. Its glyphs comparison had two faster, one slower, eight neutral and one clock exclusion; the slower edit/copy row was +15.6% with slower candidate clocks and more GC. Width inspection was neutral (+2.7%, p=.234); reversed cold cases were three neutral/one exclusion. These historical observations do not establish a material-path slowdown or clear every flag, and are not reassigned to the current refinement. CPU timings do not establish GPU frame performance. Keep this draft unmerged.

@github-actions

github-actions Bot commented Oct 17, 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 Expanded material-position conformance to stable TSL and TypeGPU on WebGPU/WebGL2, direct/indexed transforms, center an… ✅
@pmndrs/glyph packages/glyph.md · edited Close built-in material context union after downstream raster typecheck ✅

✅ attested · ⚠️ stale · ❌ missing

@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

size-limit report 📦

Surface gzip Surface gzip
Core JS 91.2 kB (0%) Inter font · Bitmap 558.2 kB (0%)
Shaper Wasm 541.6 kB (0%) Inter font · MTSDF 8.17 MB (0%)
Three.js adapter JS 142.5 kB (+0.02% Size increase) Inter font · Slug 618.3 kB (0%)
React adapter JS 142.3 kB (+0.03% Size increase) Font Awesome icons · Bitmap 449.9 kB (0%)
Vue adapter JS 142.1 kB (+0.03% Size increase) Font Awesome icons · MTSDF 8.76 MB (0%)
R3F hello-world app JS 747.0 kB (+0.01% Size increase) Font Awesome icons · Slug 657.9 kB (0%)
Tres playground app JS 571.3 kB (+0.01% 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 18, 2026 •

Copy link
Copy Markdown

Package performance: full suite

3 faster · 0 slower · 96 neutral · 9 skipped

Baseline 0.1.0-canary-4e25a96a-20261015 → candidate 0.1.0 (9ee7b780)

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

statistic baseline candidate
Median workload p50 4.350ms 3.850ms
Workloads ≤1 ms 19 18
Workloads ≤2 ms 41 41
Workloads ≤3 ms 47 47
Workloads >3 ms 52 52

Largest candidate workloads (including neutral results):

workload baseline candidate Δ time
1000 labels 100 edits interleaved edit-read publication 318.51ms 318.64ms +0.130ms
1000 labels 100 edits immediate measurements with publication 240.97ms 240.13ms -0.840ms
mutate one trailing span across 1000 formatted labels 111.82ms 114.26ms +2.440ms
100 labels interleaved edit-read publication 60.25ms 60.85ms +0.600ms
scattered character assignment in one large paragraph with 8192 paint spans 45.60ms 44.87ms -0.730ms
                                                                faster ◀       ┊       ▶ slower    Δ p50      p  baseline   candidate
+ issue 216 reporter workaround                                           ├─●─┤┊                   -9.2%   .028  ▁▇█▄▂▃▆▅▂▂ ▃█▃▁▁▃▅▂▁▁
+ write one paragraph and text mutation                                ├────●┤ ┊                  -11.4%   .002  ▂█▄▂▂▁▁▃▂▁ █▆▃▁▁▁▃▂▁▁
+ write 22k UTF16 text into owned array control                         ├──●──┤┊                  -12.6%   .005  ▄█▄▂▂▁▂▁▂▂ ██▂▁▁▂▁▁▁▁
  cached measurement                                                          ├┼─●───┤             +7.5%   .279  █▄▂▁▁▁▂▄▂▁ █▄▁▁▁▁▂▄▄▁
  reflow after width change                                                    ├─●─┤               +7.3%   .083  ▆█▅▃▅▄▅▃▁▁ ▂▆█▅▅▅▆▄▂▂
  100 labels first same-length scene publication                               ├─●┤                +6.4%   .161  ▃█▄▄▃▃▃▃▂▂ ▃█▅▄▅▃▃▂▂▁
  normalize 1000 equivalent formatted flow updates                             ┊●┤                 +4.6%  <.001  ▂▇█▅▄▃▃▂▁▁ ▁▂██▅▄▄▂▃▁
  type one character into a long paragraph and publish a frame                 ├●┤                 +4.3%   .065  ▄█▆▃▂▃▄▂▂▁ ▁█▇▅▂▂▄▂▂▂
  bind and normalize 1000 framework…ped formatted flow updates                ├┼●┤                 +3.8%   .279  ▂▅▆█▄▅▅▄▃▂ ▁▁▆██▆▅▅▄▂
  100 labels last same-length engine publication                              ├┼●─┤                +3.6%   .328  ▃█▂▃▃▃▂▁▂▁ ▃█▃▅▃▂▃▂▂▂
  publish after text change                                                   ├┼●┤                 +3.6%   .195  ▅█▄▃▃▃▂▃▂▁ ▂█▆▃▄▃▃▂▂▁
  measurement then publication after width change                              ├●┤                 +3.1%   .083  ▁▁▁▇█▇▆▅▂▁ ▁▁▁▇█▇▇▃▅▂
  100 labels first length-changing engine publication                          ├●┤                 +3.0%   .161  ▃█▄▃▃▃▃▂▁▁ ▆█▆▄▄▃▄▁▂▁
  copy per-glyph metrics from 100 unchanged labels                            ├┼●┤                 +2.7%   .798  ▃█▅▂▂▂▁▃▁▁ ▃█▄▃▂▁▁▂▂▂
  edit and independently copy one label among 1000 labels                      ├●┤                 +2.6%   .195  ▁▄▆█▆▆▄▂▂▁ ▁▄▃▆▆█▆▂▂▁
  normalize 1000 equivalent retained label updates                          ├──┼●┤                 +2.3%   .959  ▂█▄▄▆▄▃▂▂▂ ▁█▃▂▅▃▄▂▁▁
  mutate one trailing span across 1000 formatted labels                        ├●                  +2.2%   .038  ▁▄█▅▇▆▃▂▁▁ ▁▄█▆▇▄▅▄▂▂
  measure after text change                                                    ├●┤                 +2.2%   .161  █▅▇▅▂▁▃▂▂▁ ▄█▄▆▃▂▃▂▂▁
  100 labels first color-only engine publication                              ├┼●┤                 +1.9%   .574  ▂█▃▁▂▃▂▃▂▁ ▅█▅▁▃▅▂▃▃▂
  100 labels 100 edits immediate me…ements without publication                 ├●                  +1.8%   .130  ▂█▄▃▂▃▂▁▂▁ ▂█▅▃▂▂▂▂▂▁
  relayout after font-size change                                             ├●┤                  +1.6%   .442  █▄▄▅▂▂▁▁▂▁ ▂█▃▄▃▂▁▁▁▁
  10 labels last color-only engine publication                                 ●─┤                 +1.5%   .195  ▄██▄▂▃▃▅▆▂ ▂█▇▇▂▂▅▆▆▂
  rewrite 64 labels in one group                                             ├─●─┤                 +1.4%   .798  ▄▆▄▅█▃▄▂▂▁ ▆█▅▅█▅▅▂▂▂
  edit and independently copy one label among 1 labels                         ●┤                  +1.3%   .195  ▃▇█▆▆▃▂▂▃▃ ▂▇█▇▆▄▃▂▄▃
  10 labels last length-changing scene publication                            ├●┤                  +1.2%   .798  ▁▅█▆▂▄▂▃▃▁ ▂▇█▇▂▅▅▄▃▂
  borrow per-glyph metrics from 100 promoted labels                            ●─┤                 +1.1%   .328  ▁▁▄█▄▂▁▁▁▁ ▁▁▄█▄▂▁▁▁▁
  publication after width change                                              ├●┤                  +1.1%   .878  ▁▅█▅▆▅▃▃▁▂ ▁▆█▇▆▆▃▃▁▁
  10 labels first same-length engine publication                              ├●┤                  +1.0%   .442  ▄█▇▆▆▇▄▃▂▂ ▁▅█▃▅▄▄▂▂▁
  100 labels interleaved edit-read publication                                 ●                   +1.0%   .505  ▂▅█▅▃▂▂▂▂▁ ▁▇▇█▅▂▃▃▁▁
  100 labels last length-changing engine publication                           ●─┤                 +0.9%   .328  ▃█▄▄▃▃▃▃▂▂ ▇█▅▆▃▅▄▃▂▁
  1000 labels no-op scene traversal                                           ├●┤                  +0.9%   .442  ▃█▇▅▂▂▂▂▂▁ ▁█▇▄▂▂▂▂▂▁
  100 labels batched edit-read publication                                    ├●┤                  +0.9%   .798  ▂██▄▄▄▄▂▂▁ ▂█▆▅▂▃▄▂▂▁
  mount and publish a 22k-glyph paragraph                                      ●                   +0.7%   .959  ▃█▃▅▂▂▁▁▁▁ ▃█▆▄▄▂▂▂▂▁
  10 labels first color-only scene publication                                ├●┤                  +0.6%   .505  ▁█▆▅▆▄▇▅▃▂ ▂█▇▄▆▃▆▇▆▂
  1000 labels last color-only scene publication                               ├●┤                  +0.5%   .505  ▄█▅▇▅▅▂▂▂▁ ▃▆▅█▅▄▂▁▁▁
  type one character into a long Fredoka paragraph and measure                ├●┤                  +0.5%   .959  ▆██▇▅▅▂▁▂▁ ▁█▆▆▅▅▂▁▁▁
  1000 labels first length-changing engine publication                         ●                   +0.3%   .721  ▁▄█▆▆▂▁▁▁▂ ▁▄█▇▃▂▂▁▁▁
  10 labels no-op scene traversal                                             ├●─┤                 +0.2%   .878  ▁▃▃▃█▅▆▅▃▂ ▃▃▃▆▇█▆▅▄▁
  1000 labels last same-length engine publication                             ├●                   +0.1%   .959  ▂▅▇█▇▅▄▃▃▂ ▂▇▆██▇▅▄▂▁
  type one character into a long paragraph and measure                        ├●┤                  +0.1%   .721  ▅█▅▇▆▁▁▂▂▁ ▁█▆▅▄▂▁▂▂▂
  1000 labels 100 edits interleaved edit-read publication                      ●                    0.0%   .959  ▃█▄▁▁▁▁▁▂▁ ▁█▇▁▁▁▁▁▁▁
  100 labels no-op scene traversal                                            ├●┤                  -0.1%   .798  ▂█▄▂▃▃▃▂▃▁ ▄█▅▂▄▃▃▃▂▁
  1000 labels first color-only scene publication                               ●┤                  -0.1%   .645  ▄▇▆█▄▂▂▂▂▂ ▄█▄█▄▂▃▂▂▁
  1000 labels first color-only engine publication                             ├●┤                  -0.1%   .959  ▂█▆▅▇▆▃▁▁▁ ▃█▄█▆▅▄▂▁▁
  per-glyph inspection after width change                                    ├─●┤                  -0.1%   .574  ▂▂▃▁▂▃▄█▇▁ ▁▂▃▁▂▃▃█▅▁
  reorder then edit one of 1000 retained labels                               ├●┤                  -0.1%   .959  ▃█▇▆▄▃▂▃▁▂ ▄▇█▇▄▂▃▂▁▁
  move 1000 retained TypeGPU labels                                          ├─●─┤                 -0.2%   .721  ▁▇█▇▃▂▂▁▂▁ ▂▆█▅▃▂▁▂▁▁
  10 labels first same-length scene publication                                ●┤                  -0.3%   .721  ▁▅█▅▃▂▄▃▃▂ ▂██▆▃▄▄▅▃▂
  1000 labels 100 edits immediate m…surements with publication                ├●                   -0.3%   .442  ▃▅▃▁██▇▅▂▁ ▃▇▂▁█▆▃▂▁▂
  mount a label and publish its first edit                                   ├─●─┤                 -0.3%   .798  ▂██▄▇▆▅▅▃▂ ▃▇█▄▄▆▅▄▄▂
  mount 100 labels and borrow glyphs from each once                           ├●                   -0.3%   .442  ▂▇█▄▂▃▃▂▁▁ ▂█▇▄▂▃▂▂▂▂
  rewrite 256 labels in one group                                             ├●┤                  -0.4%   .721  ▃██▇▂▂▂▁▂▁ ▁▇█▆▂▂▂▁▁▁
  100 labels 100 edits immediate measurements with publication                 ●                   -0.4%   .721  ▂█▇▅▄▂▃▂▃▁ ▃█▇▄▃▃▂▄▁▁
  rewrite 512 labels in one group                                             ├●┤                  -0.5%   .959  ▂▇▆█▄▃▂▂▁▁ ▃▆█▆▄▃▂▁▂▁
  edit and measure one of 100 retained labels                                 ├●──┤                -0.7%   .959  ▂▆▇█▆▃▅▃▂▂ ▃▆█▅▆▄▃▅▃▁
  1000 labels 100 edits batched edit-read publication                         ├●┤                  -0.7%   .505  ▁▄█▅▅▃▃▃▂▁ ▃▆█▅▅▄▃▂▁▁
  read every outline from an unchanged copy                                   ├●                   -0.7%   .442  █▃▂▂▁▁▁▁▁▁ █▂▂▁▁▁▁▁▁▁
  1000 labels first length-changing scene publication                         ├●┤                  -0.8%   .721  ▁▅██▆▄▃▂▁▁ ▁▆██▄▅▂▁▂▁
  1000 labels first same-length engine publication                            ├●                   -0.8%   .050  ▁▅█▆▆▃▃▁▁▁ ▂▅█▇▃▂▁▁▁▁
  100 labels last length-changing scene publication                           ├●──┤                -1.0%   .878  ▄██▅▅▅▄▅▃▂ ▃▇█▅▃▅▅▅▂▁
  1000 labels last same-length scene publication                              ├●┤                  -1.0%   .195  ▂▇█▄▃▂▁▁▁▁ ▁▅█▄▂▂▁▁▁▁
  1000 labels 100 edits immediate m…ements without publication                ├●                   -1.0%   .161  ▃▇▄█▆▃▃▃▃▂ ▃█▇▆▆▂▂▃▃▂
  reuse 1000 unchanged Vue property snapshots                                 ├●┤                  -1.1%   .959  ▁█▂▁▁▂▂▁▂▁ ▃█▂▂▂▂▂▂▂▁
  publication after font-size change                                          ├●                   -1.1%   .328  ▂▅█▇▄▆▅▄▂▂ ▂█▇▅▆▆▄▃▁▂
  long unsafe-boundary paragraph text edit                                    ├●                   -1.2%   .645  ▃▆██▅▄▃▂▁▂ ▅▆██▅▃▃▂▂▂
  1000 labels first same-length scene publication                             ├●┤                  -1.3%   .279  ▁▅█▇▂▂▁▁▁▁ ▂██▇▄▃▂▁▁▂
  publish 1024 retained Text instances                                        ├●                   -1.3%   .234  ▂▃▄█▇▅▆▅▃▂ ▁▆▆▇█▄▄▂▃▁
  broad character assignment in one…raph with 8192 paint spans                ├●                   -1.4%   .038  ▁▂█▇▅▃▂▂▂▁ ▂▅█▆▃▂▂▁▂▁
  edit and sparsely borrow one of 1000 retained labels                        ├●┤                  -1.4%   .645  ▂▇█▅▃▅▄▅▄▂ ▁█▇▃▃▃▅▃▃▂
  10 labels last color-only scene publication                                ├─●┤                  -1.5%   .382  ▁▆█▇▇▅▇█▇▃ ▃▇▆▅▆▄▄█▅▃
  100 labels last same-length scene publication                              ├─●┤                  -1.5%   .645  ▄█▄▄▄▄▃▃▃▁ ▃█▅▄▄▄▃▃▂▁
  rewrite 128 labels in one group                                             ├●─┤                 -1.6%   .959  ▃█▆▅▅▃▄▃▁▁ ▄█▆▄▅▃▄▃▁▁
  scattered character assignment in…raph with 8192 paint spans                ├●                   -1.6%   .105  ▂██▅▂▂▂▁▁▁ ▂█▃▃▂▂▂▁▁▁
  1000 labels last length-changing engine publication                         ●┤                   -1.7%   .021  ▁▄██▄▅▃▁▁▁ ▁▄█▄▃▂▁▁▁▁
  100 labels first length-changing scene publication                         ├●┼┤                  -1.9%   .234  ▂▇█▅▃▄▅▃▂▂ ▄█▆▃▃▅▃▃▁▁
  100 labels last color-only scene publication                              ├─●┼┤                  -2.0%   .382  ▅█▅▃▃▃▂▄▄▂ ▂█▃▃▂▂▃▃▃▁
  10 labels first length-changing scene publication                           ●┤                   -2.1%   .130  ▂▇█▆▃▅▅▃▄▂ ▂█▅▃▃▅▃▄▂▁
  10 labels first length-changing engine publication                          ●┤                   -2.1%   .234  ▂█▇▆▇▅▅▃▄▂ ▃█▅▄▃▅▄▃▁▂
  copy per-glyph metrics after text change                                    ●┤                   -2.1%   .105  ▁▄▄█▅▄▃▃▂▂ ▁▇▄█▅▃▂▃▂▁
  copy per-glyph metrics with outlines after text change                      ●┤                   -2.1%   .234  ▁▁▁▁▄█▄▃▄▂ ▁▁▁▂▅█▅▄▂▂
  100 labels first color-only scene publication                              ├●┼┤                  -2.2%   .328  ▅█▅▃▂▄▃▂▄▁ ▂█▄▂▁▃▂▂▃▁
  100 labels first same-length engine publication                            ├●┼┤                  -2.4%   .442  ▃█▂▃▂▃▂▂▂▁ ▃█▁▂▃▃▂▂▂▁
  measurement after width change                                             ├●┼┤                  -2.4%   .505  ▃█▄▄▂▁▃▂▁▁ ▄█▆▃▃▂▃▁▁▁
  edit and measure one of 1000 retained labels                              ├─●┤                   -2.6%   .105  ▃█▅▃▃▅▃▃▃▁ ▃█▃▂▃▂▃▂▂▂
  10 labels last same-length engine publication                               ●┤                   -2.7%   .105  ▁██▆█▆▄▂▃▂ ▂▆██▅▄▂▄▃▁
  1000 labels last color-only engine publication                              ●┤                   -2.7%   .234  ▂▆▆██▅▃▂▂▂ ▃█▅▆█▄▂▁▁▁
  cached per-glyph inspection                                                ├●┼─┤                 -2.9%   .798  ▂▃▆█▇▂▄▄▂▂ ▁▂▇█▃▂▃▃▃▁
  long unsafe-boundary paragraph reflow                                      ├●┤                   -2.9%   .083  ▂▆▅▄▇█▆▄▄▂ ▆▆▅▄█▇▅▄▂▁
  100 labels last color-only engine publication                              ├●┼┤                  -3.2%   .382  ▅█▄▂▂▄▃▂▄▂ ▃█▃▁▂▃▃▃▃▁
  long reporter workaround paragraph reflow                                  ├●┤                   -3.2%   .195  ▃█▄▃▆▆▅▃▃▁ █▇▃▇▇▅▅▄▂▁
  10 labels last length-changing engine publication                           ●┤                   -3.4%   .005  ▂▅▇█▅▄▄▄▂▂ ▂██▆▄▃▂▃▂▁
  inspection then publication after width change                             ├●┼─┤                 -3.4%   .442  ▃█▄▁▅▆▄▅▄▂ ▃█▄▁▅▅▄▅▃▁
  common-safe word-wrap reflow                                               ├●┤                   -3.4%   .028  ▁██▂▂▂▄█▃▂ ▃█▃▂▁▃▅▄▁▁
  reorder 1000 unchanged retained labels                                    ├─●┤                   -4.7%   .003  ▂█▆▇▆▅▂▁▁▁ ▃▇█▅▂▃▂▁▁▁
  issue 216 unsafe-boundary word-wrap reflow                                ├●─┤                   -7.0%   .065  ▁█▇▄▂▂▇▅▃▁ ▃█▂▃▁▄▅▃▁▁
  measure 1000 unchanged retained labels                                   ├─●─┼┤                  -7.4%   .234  ▁▇▆▅█▇▅▅▃▂ ▁█▇▆█▇▂▁▁▁
  write 1000 paragraph-order mutations                                    ├──●─┼──────────────▶    -7.5%   .279  ▆▄█▂▂▁▂▁▁▁ ▅█▇▄▂▁▁▁▂▁
  write 1000 paragraph and text mutations                               ├───●──┤                   -9.1%   .065  ▃█▇▇▆▅▂▂▂▁ ▃█▆▄▂▁▁▁▁▁
  borrow glyphs from 1000 steadily promoted retained labels      ├──────●──────┼───┤              -23.4%   .382  ▅▆▅▃▁▁▃▆█▇ ▄▆▆▃▁▁▂██▁
                                                                └──────────────┴──────────────┘
                                                                -50%           0           +50%
status bench baseline candidate Δ time Δ p50 p 95% CI
🟢 faster issue 216 reporter workaround 868.71µs 788.53µs -0.080ms -9.2% .028 -15.6..-2.9%
🟢 faster write one paragraph and text mutation 53.39µs 47.31µs -0.006ms -11.4% .002 -28.0..-6.0%
🟢 faster write 22k UTF16 text into owned array control 187.37µs 163.78µs -0.024ms -12.6% .005 -21.7..-4.2%
96 neutral, 9 skipped
status bench baseline candidate Δ time Δ p50 p 95% CI
neutral normalize 1000 equivalent retained label updates 7.48ms 7.65ms +0.170ms +2.3% .959 -8.8..+8.3%
neutral mutate one trailing span across 1000 formatted labels 111.82ms 114.26ms +2.440ms +2.2% .038 +0.1..+3.1%
neutral edit and measure one of 100 retained labels 539.37µs 535.72µs -0.004ms -0.7% .959 -4.6..+10.1%
neutral rewrite 64 labels in one group 4.36ms 4.42ms +0.060ms +1.4% .798 -5.5..+5.2%
neutral rewrite 128 labels in one group 6.53ms 6.43ms -0.100ms -1.6% .959 -4.7..+5.3%
neutral rewrite 256 labels in one group 10.62ms 10.58ms -0.040ms -0.4% .721 -1.7..+4.4%
neutral rewrite 512 labels in one group 19.60ms 19.51ms -0.090ms -0.5% .959 -3.2..+3.0%
neutral 10 labels no-op scene traversal 170.92µs 171.28µs +0.000360ms +0.2% .878 -4.2..+5.4%
neutral 10 labels first same-length scene publication 1.27ms 1.27ms 0.000ms -0.3% .721 -1.4..+4.4%
neutral 10 labels first length-changing scene publication 1.73ms 1.69ms -0.040ms -2.1% .130 -4.9..+0.5%
neutral 10 labels first color-only scene publication 1.21ms 1.22ms +0.010ms +0.6% .505 -2.2..+4.8%
neutral 10 labels first same-length engine publication 1.24ms 1.26ms +0.020ms +1.0% .442 -2.4..+4.7%
neutral 10 labels first length-changing engine publication 1.70ms 1.66ms -0.040ms -2.1% .234 -4.7..+0.9%
neutral 10 labels last length-changing scene publication 1.65ms 1.67ms +0.020ms +1.2% .798 -2.2..+3.2%
neutral 10 labels last color-only scene publication 1.20ms 1.18ms -0.020ms -1.5% .382 -7.4..+2.0%
neutral 10 labels last same-length engine publication 1.27ms 1.23ms -0.040ms -2.7% .105 -4.2..+0.2%
neutral 10 labels last length-changing engine publication 1.64ms 1.59ms -0.050ms -3.4% .005 -5.0..-1.2%
neutral 10 labels last color-only engine publication 995.44µs 1.01ms +0.015ms +1.5% .195 -1.3..+5.0%
neutral 100 labels no-op scene traversal 262.87µs 262.51µs -0.000360ms -0.1% .798 -3.4..+4.7%
neutral 100 labels first same-length scene publication 1.74ms 1.86ms +0.120ms +6.4% .161 -1.6..+10.3%
neutral 100 labels first length-changing scene publication 2.54ms 2.49ms -0.050ms -1.9% .234 -6.0..+1.8%
neutral 100 labels first color-only scene publication 1.44ms 1.41ms -0.030ms -2.2% .328 -5.7..+2.4%
neutral 100 labels first same-length engine publication 1.56ms 1.52ms -0.040ms -2.4% .442 -6.5..+3.7%
neutral 100 labels first length-changing engine publication 2.29ms 2.36ms +0.070ms +3.0% .161 -1.4..+7.0%
neutral 100 labels first color-only engine publication 1.25ms 1.27ms +0.020ms +1.9% .574 -4.2..+5.8%
neutral 100 labels last same-length scene publication 1.80ms 1.77ms -0.030ms -1.5% .645 -7.9..+4.3%
neutral 100 labels last length-changing scene publication 2.26ms 2.24ms -0.020ms -1.0% .878 -2.8..+8.5%
neutral 100 labels last color-only scene publication 1.45ms 1.42ms -0.030ms -2.0% .382 -11.0..+3.7%
neutral 100 labels last same-length engine publication 1.60ms 1.66ms +0.060ms +3.6% .328 -3.2..+10.0%
neutral 100 labels last length-changing engine publication 2.02ms 2.04ms +0.020ms +0.9% .328 -1.6..+6.2%
neutral 100 labels last color-only engine publication 1.27ms 1.22ms -0.050ms -3.2% .382 -7.7..+4.9%
neutral 1000 labels no-op scene traversal 1.25ms 1.26ms +0.010ms +0.9% .442 -1.9..+4.2%
neutral 1000 labels first same-length scene publication 6.88ms 6.80ms -0.080ms -1.3% .279 -2.5..+4.5%
neutral 1000 labels first length-changing scene publication 10.76ms 10.67ms -0.090ms -0.8% .721 -1.8..+1.8%
neutral 1000 labels first color-only scene publication 5.44ms 5.44ms 0.000ms -0.1% .645 -1.6..+2.6%
neutral 1000 labels first same-length engine publication 6.30ms 6.25ms -0.050ms -0.8% .050 -2.4..-0.1%
neutral 1000 labels first length-changing engine publication 10.11ms 10.14ms +0.030ms +0.3% .721 -1.2..+0.7%
neutral 1000 labels first color-only engine publication 4.62ms 4.62ms 0.000ms -0.1% .959 -2.3..+3.1%
neutral 1000 labels last same-length scene publication 6.85ms 6.78ms -0.070ms -1.0% .195 -1.7..+2.5%
neutral 1000 labels last color-only scene publication 5.42ms 5.45ms +0.030ms +0.5% .505 -2.9..+1.8%
neutral 1000 labels last same-length engine publication 6.16ms 6.16ms 0.000ms +0.1% .959 -1.9..+1.4%
neutral 1000 labels last length-changing engine publication 7.31ms 7.18ms -0.130ms -1.7% .021 -4.9..-0.5%
neutral 1000 labels last color-only engine publication 4.79ms 4.66ms -0.130ms -2.7% .234 -4.8..+1.5%
neutral 100 labels 100 edits immediate measurements without publication 12.25ms 12.47ms +0.220ms +1.8% .130 -0.6..+2.3%
neutral 100 labels 100 edits immediate measurements with publication 40.07ms 39.89ms -0.180ms -0.4% .721 -1.4..+0.8%
neutral 100 labels batched edit-read publication 18.04ms 18.21ms +0.170ms +0.9% .798 -2.8..+3.3%
neutral 100 labels interleaved edit-read publication 60.25ms 60.85ms +0.600ms +1.0% .505 -0.8..+1.5%
neutral 1000 labels 100 edits immediate measurements without publication 14.73ms 14.59ms -0.140ms -1.0% .161 -2.5..+0.2%
neutral 1000 labels 100 edits immediate measurements with publication 240.97ms 240.13ms -0.840ms -0.3% .442 -4.2..+1.1%
neutral 1000 labels 100 edits batched edit-read publication 26.31ms 26.11ms -0.200ms -0.7% .505 -2.9..+1.8%
neutral 1000 labels 100 edits interleaved edit-read publication 318.51ms 318.64ms +0.130ms 0.0% .959 -1.0..+1.3%
neutral mount and publish a 22k-glyph paragraph 37.71ms 37.99ms +0.280ms +0.7% .959 -1.3..+1.6%
neutral mount a label and publish its first edit 6.48ms 6.46ms -0.020ms -0.3% .798 -6.2..+7.4%
neutral mount 100 labels and borrow glyphs from each once 31.85ms 31.75ms -0.100ms -0.3% .442 -2.9..+1.1%
neutral measure after text change 6.21ms 6.35ms +0.140ms +2.2% .161 -0.3..+5.5%
neutral publish after text change 4.90ms 5.08ms +0.180ms +3.6% .195 -2.8..+7.4%
neutral reflow after width change 1.62ms 1.74ms +0.120ms +7.3% .083 -0.7..+13.1%
neutral relayout after font-size change 4.35ms 4.42ms +0.070ms +1.6% .442 -4.7..+4.2%
neutral type one character into a long paragraph and measure 5.09ms 5.10ms +0.010ms +0.1% .721 -2.3..+3.3%
neutral type one character into a long Fredoka paragraph and measure 4.35ms 4.38ms +0.030ms +0.5% .959 -2.7..+4.0%
neutral type one character into a long paragraph and publish a frame 8.23ms 8.59ms +0.360ms +4.3% .065 -0.1..+7.1%
neutral reuse 1000 unchanged Vue property snapshots 798.20µs 789.10µs -0.009ms -1.1% .959 -3.5..+3.8%
neutral normalize 1000 equivalent formatted flow updates 15.48ms 16.20ms +0.720ms +4.6% <.001 +2.5..+6.7%
neutral bind and normalize 1000 framework-shaped formatted flow updates 17.61ms 18.27ms +0.660ms +3.8% .279 -2.5..+6.7%
neutral copy per-glyph metrics after text change 12.42ms 12.16ms -0.260ms -2.1% .105 -4.8..+0.9%
neutral copy per-glyph metrics from 100 unchanged labels 499.42µs 512.99µs +0.014ms +2.7% .798 -4.4..+6.0%
neutral edit and independently copy one label among 1 labels 3.31ms 3.35ms +0.040ms +1.3% .195 -1.0..+3.6%
neutral edit and independently copy one label among 1000 labels 7.80ms 8.01ms +0.210ms +2.6% .195 -1.1..+5.5%
neutral borrow per-glyph metrics from 100 promoted labels 1.03ms 1.04ms +0.010ms +1.1% .328 -1.6..+6.1%
neutral cached measurement 1.25µs 1.34µs +0.000090ms +7.5% .279 -4.2..+21.5%
neutral measurement after width change 2.84ms 2.77ms -0.070ms -2.4% .505 -6.3..+2.8%
neutral measurement then publication after width change 5.46ms 5.63ms +0.170ms +3.1% .083 -0.1..+6.6%
neutral cached per-glyph inspection 264.47µs 256.90µs -0.008ms -2.9% .798 -7.1..+7.4%
neutral per-glyph inspection after width change 21.13ms 21.10ms -0.030ms -0.1% .574 -5.6..+4.4%
neutral inspection then publication after width change 16.20ms 15.65ms -0.550ms -3.4% .442 -6.9..+5.5%
neutral publication after font-size change 13.60ms 13.45ms -0.150ms -1.1% .328 -2.3..+1.1%
neutral publication after width change 3.43ms 3.47ms +0.040ms +1.1% .878 -3.2..+4.6%
neutral copy per-glyph metrics with outlines after text change 12.96ms 12.70ms -0.260ms -2.1% .234 -3.8..+1.5%
neutral read every outline from an unchanged copy 2.93ms 2.91ms -0.020ms -0.7% .442 -1.7..+0.9%
neutral write 1000 paragraph-order mutations 164.90µs 152.53µs -0.012ms -7.5% .279 -15.3..+106.7%
neutral write 1000 paragraph and text mutations 409.01µs 371.64µs -0.037ms -9.1% .065 -22.3..+0.1%
neutral scattered character assignment in one large paragraph with 8192 paint spans 45.60ms 44.87ms -0.730ms -1.6% .105 -3.0..+0.3%
neutral broad character assignment in one large paragraph with 8192 paint spans 45.37ms 44.73ms -0.640ms -1.4% .038 -3.4..-0.1%
neutral reorder 1000 unchanged retained labels 6.40ms 6.09ms -0.310ms -4.7% .003 -9.4..-1.6%
neutral reorder then edit one of 1000 retained labels 13.96ms 13.95ms -0.010ms -0.1% .959 -1.8..+2.2%
neutral measure 1000 unchanged retained labels 449.77µs 416.35µs -0.033ms -7.4% .234 -12.9..+4.3%
neutral borrow glyphs from 1000 steadily promoted retained labels 5.02ms 3.85ms -1.170ms -23.4% .382 -45.5..+14.4%
neutral edit and measure one of 1000 retained labels 633.73µs 617.12µs -0.017ms -2.6% .105 -9.0..+1.0%
neutral edit and sparsely borrow one of 1000 retained labels 687.44µs 677.61µs -0.010ms -1.4% .645 -4.6..+2.2%
neutral publish 1024 retained Text instances 38.87ms 38.35ms -0.520ms -1.3% .234 -4.1..+0.6%
neutral move 1000 retained TypeGPU labels 515.50µs 514.72µs -0.000780ms -0.2% .721 -5.4..+5.0%
neutral common-safe word-wrap reflow 804.21µs 776.66µs -0.028ms -3.4% .028 -7.2..-0.9%
neutral issue 216 unsafe-boundary word-wrap reflow 822.86µs 765.40µs -0.057ms -7.0% .065 -11.3..+0.3%
neutral long reporter workaround paragraph reflow 1.84ms 1.78ms -0.060ms -3.2% .195 -5.8..+1.4%
neutral long unsafe-boundary paragraph reflow 1.55ms 1.51ms -0.040ms -2.9% .083 -7.9..+0.7%
neutral long unsafe-boundary paragraph text edit 4.46ms 4.41ms -0.050ms -1.2% .645 -2.2..+1.3%
skipped: clock-confounded: neutral→slower · 2.45→2.59 10 labels first color-only engine publication
skipped: clock-confounded: neutral→slower · 2.54→2.61 10 labels last same-length scene publication
skipped: clock-confounded: neutral→slower · 2.44→2.61 1000 labels last length-changing scene publication
skipped: clock-confounded: slower→neutral · 2.42→2.54 publish after color change
skipped: clock-confounded: slower→neutral · 2.60→2.55 measure 100 unchanged labels
skipped: clock-confounded: neutral→faster · 2.61→2.46 publication after text change
skipped: clock-confounded: faster→neutral · 2.83→2.96 write 22k UTF16 text into Wasm request arena
skipped: clock-confounded: neutral→faster · 2.57→2.41 unchanged character assignment in one large paragraph with 8192 paint spans
skipped: clock-confounded: neutral→faster · 2.53→2.39 toggle one group containing 1000 retained labels

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

Labels

benchmark:full Run the full package Labs matrix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant