Skip to content

Scoped display flushes, a scoped sync flush, and the revolve shell family name - #31

Merged
aka-blackboots merged 4 commits into
mainfrom
feature/scoped-flush
Oct 30, 2026
Merged

aka-blackboots merged 4 commits into
mainfrom
feature/scoped-flush

Conversation

@aka-blackboots

@aka-blackboots aka-blackboots commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Faster display flushes for large scenes, a scoped sync flush, and a clearer shell refusal for revolves.

a flush swaps only the bodies that changed

Before, every edit and every geometry arrival swapped every live body, so building a large model was quadratic.

  • Every flush now uses the changed scope. A set of ready shapes replaces readyVersion.
  • Only displayed bodies are swapped and call wanted().
  • The record pool indexes records by shape, keeps idle records in LRU order and matches records by identity.
  • The storey acceptance test now times build plus first render together (storeyBuildAndFirstRenderMs). The total is about 8 % faster; the first render alone is longer, because LOD reads moved out of the build.

Swaps per step at 0 / 1,000 / 5,000 live bodies:

Step Before After
create, updateMatrixWorld, dispose 1 / 2,001 / 10,001 1 / 1 / 1
create 2, operate subtract, dispose 2 2 / 1,002 / 5,002 0 / 0 / 0

Cost per body at 4k against 1k: rebuild 1.04x, settled() after edits 0.79x, dispose with geometry 1.36x.

a sync flush that meshes only the given bodies

OpenGeometry.flush({ geometry: 'sync', bodies }) meshes and places only the given bodies. No other body is meshed, swapped or refined; displayed instances of the same shape get the same record. Each given mesh has a current world matrix after the call, so no second scene walk is needed. A disposed body throws Disposed and a wrong input throws InvalidParameter, before anything is meshed. Without bodies, flush behaves as before. The rules are in the README Display row.

With 1,000 or 4,000 bodies waiting for a mesh, a scoped sync of 1 edited body makes 1 tessellation and takes 0.3 to 6 ms; a full sync takes 730 ms and 2,100 ms.

shell of a revolve names the right family

Shelling a full-turn revolve is still refused with CoverageGap. The families are now ["restricted analytic shell", "revolved profile"]. A true arc-edged extrusion keeps its family.

Checks

  • npm run check:full: 20/20 on the branch tip.
  • Kernel snapshot: no difference from main.
  • SDK snapshot: no difference. API surface: one changed line, the new bodies option of flush.

Shelling a full-turn revolve is still refused with CoverageGap. The families are now
["restricted analytic shell", "revolved profile"]. A true arc-edged extrusion keeps its family.
Every flush now uses the changed scope. A set of ready shapes replaces readyVersion, so an edit or a
received record swaps only the bodies whose record or change set moved, and only displayed bodies call
wanted(). The record pool indexes records by shape and keeps idle records in LRU order, and it matches
records by identity. The storey acceptance test now times build plus first render together.
…e given bodies

A sync flush with bodies meshes only those bodies now. No other body is meshed, swapped or refined;
displayed instances of the same shape get the same record. Each given mesh has a current world matrix
after the call, so no second scene walk is needed. A disposed body throws Disposed and a wrong input
throws InvalidParameter, before anything is meshed. Without bodies, flush behaves as before.
@aka-blackboots aka-blackboots changed the title Scoped flushes and a scoped sync flush (OPE-56, OPE-94), revolve shell family name (OPE-93) Scoped display flushes, a scoped sync flush, and the revolve shell family name Oct 30, 2026
@aka-blackboots
aka-blackboots merged commit 053b471 into main Oct 30, 2026
0 of 6 checks passed
@aka-blackboots
aka-blackboots deleted the feature/scoped-flush branch October 30, 2026 23:20
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