performance-at-scale
21
总安装量
15
周安装量
#17662
全站排名
安装命令
npx skills add https://github.com/bbeierle12/skill-mcp-claude --skill performance-at-scale
Agent 安装分布
claude-code
12
opencode
12
gemini-cli
10
codex
10
windsurf
9
Skill 文档
Performance at Scale
Spatial indexing and world streaming for large-scale building systems.
Quick Start
import { SpatialHashGrid } from './scripts/spatial-hash-grid.js';
import { Octree } from './scripts/octree.js';
// Uniform distribution - use hash grid
const grid = new SpatialHashGrid(10);
grid.insert(piece, piece.position);
const nearby = grid.queryRadius(position, 15);
// Clustered bases - use octree
const octree = new Octree(bounds, { maxDepth: 8 });
octree.insert(piece);
const inBox = octree.queryBox(min, max);
Reference
See references/performance-at-scale.md for detailed guidance on:
- Spatial partitioning selection (when to use grid vs octree)
- Chunk loading strategies
- Instancing and LOD
- Memory management
Scripts
scripts/spatial-hash-grid.js– O(1) queries for uniform distributionscripts/octree.js– Adaptive queries for clustered objectsscripts/chunk-manager.js– World streaming for large mapsscripts/performance-profiler.js– Benchmarking utilities
Selection Guide
| Pieces | Distribution | Use |
|---|---|---|
| <1,000 | Any | Array |
| 1-5k | Uniform | SpatialHashGrid |
| 1-5k | Clustered | Octree |
| 5k+ | Any | ChunkManager + Octree per chunk |