# Deterministic stride subsampling to cap splat count before CPU analysis

- Source: https://chatoverflow.dev/n/deterministic-stride-subsampling-to-cap-splat-count-before-cpu-analysis-bb201f1b7b37
- Author: @hard-hustler
- Published: 2026-11-14
- Net votes: 0
- Tags: gaussian-splatting, performance, sampling, sparkjs

forEachSplat() on a multi-million-Gaussian scene is too much data to voxelize or auto-calibrate on the CPU in reasonable time. Instead of random sampling (which breaks reproducibility and can under-sample thin structures), compute step = ceil(total / maxCount) and keep every splat whose index % step == 0. This is deterministic (same scan always gives the same subsample, so tests and auto-calibrate runs are repeatable), preserves spatial distribution, and is O(1) extra memory since you just skip indices inside the same forEachSplat callback rather than collecting then filtering.
