Repository navigation
Conversation
Three r186 geometry disposal destroys the GPU buffer of every attribute on the geometry. Each draw geometry also carries the root's shared Codec buffers, transform table, and detached glyph storage, so removing one TextGroup destroyed buffers a sibling draw's bind group still referenced and every later submit failed WebGPU validation. Retired draws now detach shared storage that outlives the publication before disposal. Storage retiring in the same publication stays attached, so Three still releases it. Validation: two new three-v1 tests fail before and pass after; the full Glyph check passes (1,028 package and integration tests). A packed build on three 0.186.1 removes the label with a clean console (66 validation errors in 60 frames before); three 0.185.1 behaves identically before and after.
Docs report 📚Every changed package is attested at this head. A reviewer verifies each claim after merge.
✅ attested · |
Package performance:
|
| statistic | baseline | candidate |
|---|---|---|
| Median workload p50 | 3.885ms | 3.745ms |
| Workloads ≤1 ms | 1 | 1 |
| Workloads ≤2 ms | 2 | 2 |
| Workloads ≤3 ms | 2 | 2 |
| Workloads >3 ms | 4 | 4 |
Largest candidate workloads (including neutral results):
| workload | baseline | candidate | Δ time |
|---|---|---|---|
| measure after text change | 6.25ms | 6.18ms | -0.070ms |
| publish after text change | 5.07ms | 4.91ms | -0.160ms |
| relayout after font-size change | 4.47ms | 4.30ms | -0.170ms |
| publish after color change | 3.30ms | 3.19ms | -0.110ms |
| reflow after width change | 1.74ms | 1.61ms | -0.130ms |
faster ◀ ┊ ▶ slower Δ p50 p baseline candidate
measure after text change ├──●┼┤ -1.0% .200 █▆▅▅▂▃▂▃▂▁ █▅▇▄▁▂▁▂▂▁
publish after color change ├────●─┼──┤ -3.1% .343 ▅█▅▆▂▂▁▁▁▁ ▇█▄▄▃▂▁▁▁▁
publish after text change ├──────●─┤ -3.2% .114 █▆█▇▄▃▂▂▂▂ ▅█▃▆▂▃▂▁▁▁
relayout after font-size change ├───●──┼──┤ -3.9% .343 █▆▄▄▂▂▁▁▂▁ █▆▄▅▂▂▁▁▁▁
measure 100 unchanged labels ├───────●────┼────────┤ -7.0% .486 ▄▅▇██▃▅▁▁▂ ▅▄█▇▄▂▃▃▁▁
reflow after width change ├─────●─────┼────┤ -7.4% .114 ▆▅▇▃▅█▄▅▃▁ ▆█▇▂▃▇▄▃▂▂
└──────────────┴──────────────┘
-20% 0 +20%All 6 compared benches are neutral.
6 neutral, 0 skipped
| status | bench | baseline | candidate | Δ time | Δ p50 | p | 95% CI |
|---|---|---|---|---|---|---|---|
| neutral | measure after text change | 6.25ms | 6.18ms | -0.070ms | -1.0% | .200 | -4.8..+0.8% |
| neutral | publish after text change | 5.07ms | 4.91ms | -0.160ms | -3.2% | .114 | -12.0..+0.4% |
| neutral | reflow after width change | 1.74ms | 1.61ms | -0.130ms | -7.4% | .114 | -16.1..+6.3% |
| neutral | publish after color change | 3.30ms | 3.19ms | -0.110ms | -3.1% | .343 | -9.4..+4.1% |
| neutral | relayout after font-size change | 4.47ms | 4.30ms | -0.170ms | -3.9% | .343 | -9.5..+4.6% |
| neutral | measure 100 unchanged labels | 62.69µs | 58.32µs | -0.004ms | -7.0% | .486 | -17.0..+11.6% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removing a TextGroup on Three r186 could destroy storage still used by a sibling. Retired draw geometries now detach shared attributes that remain owned by the root; replaced generations retain Three's geometry release path.
This also fixes final-owner disposal after a nonempty → empty publication, including a rendered draw replaced by a never-rendered draw. On published Three r185/r186, a private compatibility adapter registers the actual renderer's attribute manager and calls its canonical delete path when the attribute's owner disposes it. It covers material-only placement storage and detached Glyphs storage, supports multiple renderers, and uses weak references. Repeated frames perform one mesh-local WeakSet lookup. Public API, ABI and peer ranges are unchanged.
Validation of runtime head
391aebd920870afd17529d610974902cd7407b53(runtime fixadbdc371, followed by documentation formatting) and regression-harness head4027390b516d0af1dfafe8c56bd99d682482aeb8:0 → 10 → 2 → 10 → 2 → 0; initial and revived readback match exactly. The authenticated original package leaks 18 and 10 storage attributes respectively in the same proof.benchmark:three-storage-lifetime --scenario=siblingharness and source-bound browser proof are committed on this PR.4027390bpasses all five jobs, including benchmark application/script types, browser conformance, packed-consumer verification, size and performance reporting.Local browser-tested package SHA-256:
926aee67b36ea35e0814a5b2f59576e56ec6a40b5155be0ad5962fba635c65be. CI package SHA-256:742bcba06fc86545db2ad577063ccf8c92c602000af9a3ca2e9844975aae2b93. All runtime JavaScript, declarations and package manifest are byte-identical between them; the five Wasm members differ, so the local proof is not claimed as an exact-byte CI-package replay. CI's independent correctness job passed. The named regression workflow isbenchmark:three-storage-lifetime. The compatibility bridge is limited to verified revisions 185/186; later Three revisions use attribute disposal directly. This PR remains unmerged.