Skip to content

Harden frame buffering and point-cloud memory use - #47

Merged
Lyptik merged 6 commits into
mainfrom
fix/audit-frame-buffer-and-point-clouds
Oct 6, 2026
Merged

Lyptik merged 6 commits into
mainfrom
fix/audit-frame-buffer-and-point-clouds

Conversation

@Lyptik

@Lyptik Lyptik commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Audit fixes

This implements the remaining findings from the ThreeJS example audit.

Tracking-frame handoff

  • keep one pending frame per Scene
  • continuous tracking state remains latest-wins
  • preserve/conflate cluster transition states across replaced frames
  • accumulate zone enter/leave counters with byte-range saturation
  • never retain an old point cloud just to preserve a transient event

Point-cloud memory

  • stop attaching SDK point arrays directly to Three.js BufferAttributes
  • own renderer-side Float32Array buffers so a point cloud cannot retain the complete decompressed WebSocket frame backing store
  • reuse capacity in 256-point chunks across small point-count changes
  • use drawRange for the valid point count
  • when capacity must grow, replace the geometry and dispose the old geometry so GPU resources are released

Validation/docs

  • add frame-conflation regression tests
  • add a generic UI-map/DOM selector contract test
  • update README for Zstd compression, primary Velocity vectors control, bounded frame buffering and reusable point buffers
  • record the memory/backpressure invariants in AGENTS.md

The stale Display Advanced preference reference was already fixed on main in commit 91224a2, so this PR is based after that fix.

@Lyptik
Lyptik merged commit 77097ff into main Oct 6, 2026
1 check passed
@Lyptik
Lyptik deleted the fix/audit-frame-buffer-and-point-clouds branch October 6, 2026 07:06
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