Skip to content

Optimize Gaussian Splat loading - #34205

Merged
Mugen87 merged 1 commit into
mrdoob:devfrom
bhouston:faster-gaussian-splat-loading
Aug 10, 2026
Merged

Optimize Gaussian Splat loading#34205
Mugen87 merged 1 commit into
mrdoob:devfrom
bhouston:faster-gaussian-splat-loading

Conversation

@bhouston

Copy link
Copy Markdown
Contributor

I profiled the Gaussian Splat loaders this morning and found a few slow spots that were easy to optimize:

  • I was manually clamping bytes unnecessarily when I could just use a UInt8ClampedArray.
  • Inlined some math, rather than using helpers.
  • Removed data access indirection.
  • Inlined some small loops.
  • Added lookup tables when there is 1024 or less values for the stored data in the SPZLoader.

Overall, this speeds up the Gaussian Splat loaders so that they barely show up in the profiler outside of the SPZLoader's dependency on fflate (which is outside of my optimization scope.)

@github-actions

Copy link
Copy Markdown

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 366.31
86.86
366.31
86.86
+0 B
+0 B
WebGPU 696.95
192.4
696.95
192.4
+0 B
+0 B
WebGPU Nodes 694.94
192.1
694.94
192.1
+0 B
+0 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 509.7
123.83
510.37
124.05
+670 B
+224 B
WebGPU 771.58
207.3
772.25
207.52
+670 B
+224 B
WebGPU Nodes 720.54
194.63
721.21
194.86
+670 B
+228 B

Comment thread src/core/BufferGeometry.js Outdated
@bhouston
bhouston force-pushed the faster-gaussian-splat-loading branch from 56d517c to 595aa12 Compare August 10, 2026 15:00
@Mugen87 Mugen87 added this to the r186 milestone Aug 10, 2026
@Mugen87
Mugen87 merged commit f3d4390 into mrdoob:dev Aug 10, 2026
16 checks passed
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.

2 participants