mcpField
P
performance-at-scale

performance-at-scale

github.com/bbeierle12Development958 installsUpdated 1d ago
Repository

About performance-at-scale

performance-at-scale is a skill for handling spatial indexing and world streaming in large-scale building systems. It provides selection guidance and scripts for spatial grids, octrees, chunk management, and profiling.

Key features

  1. 01SpatialHashGrid for uniform layouts
  2. 02Octree for clustered objects
  3. 03Chunk-based world streaming
  4. 04Performance profiling utilities
  5. 05Guidance on instancing, LOD, and memory

Use cases

  1. 01Querying nearby pieces in a uniform layout
  2. 02Handling clustered objects spatially
  3. 03Streaming chunks in large maps
  4. 04Benchmarking performance approaches

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/bbeierle12/skill-mcp-claude --skill performance-at-scale

After installing, type/performance-at-scalein Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

_meta.json
references/
performance-at-scale.md
scripts/
chunk-manager.js
octree.js
performance-profiler.js
spatial-hash-grid.js

Details

From the project README

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 distribution
  • scripts/octree.js - Adaptive queries for clustered objects
  • scripts/chunk-manager.js - World streaming for large maps
  • scripts/performance-profiler.js - Benchmarking utilities

Selection Guide

PiecesDistributionUse
<1,000AnyArray
1-5kUniformSpatialHashGrid
1-5kClusteredOctree
5k+AnyChunkManager + Octree per chunk

Comments

Markdown supported