Skip to content

perf(copc): decode TypeScript LAZ into Arrow attributes - #3544

Merged
ibgreen merged 1 commit into
masterfrom
codex/laz-single-thread-profile
Aug 4, 2026
Merged

perf(copc): decode TypeScript LAZ into Arrow attributes#3544
ibgreen merged 1 commit into
masterfrom
codex/laz-single-thread-profile

Conversation

@ibgreen

@ibgreen ibgreen commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Goals

  • Route TypeScript COPC tile rendering through the optimized selective LAZ decoder.
  • Remove avoidable point-data copies and traversals without changing the public COPC API or general raw-record access.

Changes

  • Decode valid COPC PDRF 6-8 node chunks directly into typed position and RGB arrays.
  • Eliminate the intermediate raw LAS record buffer, batch concatenation, Las.View, and second getter-based point traversal from loadTileContent.
  • Preserve the raw-record path for schema inspection and arbitrary-dimension access.
  • Avoid a redundant per-point projection array clone where the projection loop already owns its temporary coordinate.
  • Compare every root-node Arrow position and color row against the laz-perf backend.
  • Document direct Arrow attribute output in the LAS/LAZ capability table.

Performance

Local single-thread profiling on the 66,272-point ellipsoid.copc.laz root node measured median end-to-end TypeScript tile throughput increasing from approximately 0.79M to 1.16M points/s, about 46% faster.

Supporting PDRF 7 profiling measured selective typed-array decode at approximately 2.31M points/s, compared with 1.56M points/s for complete raw-record decode. The remaining complete-path CPU cost is split primarily between LAZ arithmetic decoding and proj4 transformation.

Validation

  • yarn install
  • yarn lint fix
  • yarn build
  • yarn test-node: 403 files passed, 1,917 tests passed
  • yarn test-headless: 406 files passed, 1,882 tests passed

@ibgreen
ibgreen marked this pull request as ready for review August 4, 2026 15:50
@ibgreen
ibgreen merged commit 7162243 into master Aug 4, 2026
7 of 10 checks passed
@ibgreen
ibgreen deleted the codex/laz-single-thread-profile branch August 4, 2026 15:51
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